コード例 #1
0
        public override void Execute()
        {
            //Debug.Log("Execute Move Action for " + m_mover.name);
            Vector3    realPosition = new Vector3(m_goal.x + xz_offset, m_mover.transform.position.y, m_goal.y + xz_offset);
            Vector3    dir          = realPosition - m_mover.transform.position;
            Quaternion rot          = Quaternion.LookRotation(dir, Vector3.up);

            //LeanTween.rotate(m_mover.gameObject, rot.eulerAngles, 0.10f);
            m_mover.UpdatePosition(realPosition);
            m_mover.UpdateRotation(rot);
            //LeanTween.move(m_mover.gameObject, realPosition, 0.25f);
        }