예제 #1
0
        private void Start()
        {
            attr        = GetComponent <NpcAttribute>();
            aiBase      = GetComponent <AIBase>();
            vcontroller = GetComponent <MoveController>().vcontroller;

            gameObject.AddComponent <DebugServerPos>();
        }
예제 #2
0
        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;
        }
예제 #3
0
        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);
        }