Ejemplo n.º 1
0
    //初始化
    public override void Init()
    {
        _playerLayer   = GameObject.Find("PlayerLayer").transform;
        _cameraManager = Camera.main.GetComponent <CameraFollow>();

        _charaDic     = new Dictionary <uint, CharaActorInfo>();
        _charaViewDic = new Dictionary <uint, GameObject>();
        _charaList    = new List <CharaActorInfo>();
        SceneFrame    = 0;

        _playerPrefab = new Dictionary <uint, GameObject>();

        //操作集合初始化
        CommandDic = new Dictionary <uint, List <FightCommandBase> >();

        OwnerControl.GetInstance().Init();

        //技能解析管理器初始化
        SkillActionManager.GetInstance().Init();
        //特效管理器
        EffectManager.GetInstance().Init();
        //战斗ui
        ZTSceneUI.GetInstance().Init();
        InitEvent();
    }
Ejemplo n.º 2
0
    public override void Destroy()
    {
        RemoveEvent();
        ClearChara();

        OwnerControl.GetInstance().Destroy();
        //地图移除
        MapManager.GetInstance().Destroy();
        //技能解析管理器移除
        SkillActionManager.GetInstance().Destroy();
        //特效管理器
        EffectManager.GetInstance().Destroy();
        //战斗ui
        ZTSceneUI.GetInstance().Destroy();
    }
Ejemplo n.º 3
0
 //刷新对象( 场景相关计算 唯一更新接口)
 public void Update()
 {
     if (SceneFrame > FightDefine.MaxFrame)
     {
         SceneFrame = 0;
     }
     SceneFrame++;
     //刷新玩家虚拟摇杆
     OwnerControl.GetInstance().Update();
     UpdateCommand();
     UpdatePlayer();
     UpdateMap();
     SkillActionManager.GetInstance().Update();
     //战斗ui
     ZTSceneUI.GetInstance().Update();
 }