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); }
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(); } }
//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); }