Пример #1
0
        //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);
        }
Пример #2
0
        /// <summary>
        /// 创建
        /// </summary>
        /// <param name="data"></param>
        /// <param name="pos"></param>
        public void Create(PlayerData data, Vector3 pos)
        {
            LOG_TAG   = LOG_TAG + "[" + data.id + "]";
            m_data    = data;
            m_context = GameManager.Instance.Context;

            //创建用来显示视图的容器
            m_container = new GameObject("_Ship" + data.id);

            //创建飞船
            m_Shap = EntityFactory.InstanceEntity <ShipBase>();
            m_Shap.Create(pos, "Ships/AXS/prefab_AXS", GameObject.Find("Ship_Avatar").transform);
        }
Пример #3
0
 protected override void Release()
 {
     m_entity = null;
 }