示例#1
0
文件: Player.cs 项目: evesgf/DogFight
        private void ShipRotate()
        {
            Quaternion q = Quaternion.Euler(m_Shap.Quate().eulerAngles.x, m_Shap.Quate().eulerAngles.y + m_InputQuate.x, m_Shap.Quate().eulerAngles.z + m_InputQuate.z);

            m_Shap.QuateTo(q);
            m_Shap.MoveTo(m_Shap.Position() + q * Vector3.right);
        }
示例#2
0
文件: Ship01.cs 项目: evesgf/DogFight
 private void Update()
 {
     if (m_entity != null)
     {
         gameObject.transform.rotation = m_entity.Quate();
         //gameObject.transform.Rotate(new Vector3(0, m_entityQuate.x * rotateSpped,m_entityQuate.z* rotateSpped));
         gameObject.transform.localPosition = m_entity.Position();
     }
 }
示例#3
0
文件: Ship01.cs 项目: evesgf/DogFight
        //private WeaponBase weapon;

        protected override void Create(EntityObject entity)
        {
            m_entity                     = entity as ShipBase;
            m_entityPosition             = m_entity.Position();
            this.transform.localPosition = m_entityPosition;
            Debug.Log("Create:" + m_entity);

            //weapon = EntityFactory.InstanceEntity<WeaponBase>();
            //weapon.Create(weaponRoot);
        }