浏览代码

Debug code useful for understanding state of Impulses

/2019.3-marc
Marc Tanenbaum 5 年前
当前提交
6ee6d68d
共有 2 个文件被更改,包括 54 次插入0 次删除
  1. 43
      Assets/CMCoreListener.cs
  2. 11
      Assets/CMCoreListener.cs.meta

43
Assets/CMCoreListener.cs


using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using Cinemachine;
public class CMCoreListener : MonoBehaviour
{
public CinemachineImpulseListener l1;
public CinemachineImpulseListener l2;
private bool isHitL1;
private bool isHitL2;
private void Update()
{
Vector3 soundLocationL1 = Vector3.zero;
Quaternion rotLocL1 = Quaternion.identity;
isHitL1 = CinemachineImpulseManager.Instance.GetImpulseAt(l1.transform.position, false,
l1.m_ChannelMask, out soundLocationL1, out rotLocL1);
Vector3 soundLocationL2 = Vector3.zero;
Quaternion rotLocL2 = Quaternion.identity;
isHitL2 = Cinemachine.CinemachineImpulseManager.Instance.GetImpulseAt(l1.transform.position, false,
l1.m_ChannelMask, out soundLocationL2, out rotLocL2);
}
private void OnGUI()
{
if (gameObject.transform.parent != null && gameObject.transform.parent.name == "Player 4")
{
string str = string.Format("Hit1: {0}\nHit2: {1}", isHitL1.ToString(), isHitL2.ToString());
GUI.TextField(new Rect(0, 0, 100, 100), str);
}
}
}

11
Assets/CMCoreListener.cs.meta


fileFormatVersion: 2
guid: c915b402b0fc14349b2a504defcd32e9
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
正在加载...
取消
保存