Exemplo n.º 1
0
        protected override void OnShow(object userData)
        {
            base.OnShow(userData);

            m_MyTankData = userData as MyTankData;
            if (m_MyTankData == null)
            {
                Log.Error("My tank data is invalid.");
                return;
            }

            string m_TankId = m_MyTankData.TankId;

            Debug.Log("Add Tank Id" + m_TankId);
            GameEntry.LockManager.AddActor(m_TankId, this);
            Debug.Log("!~!!!!!!! AddActor - " + m_TankId + " + " + this.Name);

            // 设置相机跟踪玩家自己
            m_CameraControl          = GameObject.Find("Main Camera").AddComponent <CameraControlPro>();
            m_CameraControl.m_Target = this.transform;
        }
Exemplo n.º 2
0
 public static void ShowMyTank(this EntityComponent entityComponent, MyTankData data)
 {
     entityComponent.ShowEntity(typeof(MyTank), "Tank", Constant.AssetPriority.MyTankAsset, data);
 }