private void Start() { attr = GetComponent <NpcAttribute>(); aiBase = GetComponent <AIBase>(); vcontroller = GetComponent <MoveController>().vcontroller; gameObject.AddComponent <DebugServerPos>(); }
public override void Init() { base.Init(); var playerMove = GetAttr().GetComponent <MoveController>(); vcontroller = playerMove.vcontroller; physics = GetAttr().GetComponent <IPhysicCom>(); camRight = CameraController.Instance.camRight; camForward = CameraController.Instance.camForward; }
public static bool IsLocalMove(VirtualController vcontroller) { float v = 0; float h = 0; if (vcontroller != null) { h = vcontroller.inputVector.x; //CameraRight v = vcontroller.inputVector.y; //CameraForward } bool isMoving = Mathf.Abs(h) > 0.1f || Mathf.Abs(v) > 0.1f; return(isMoving); }