Ejemplo n.º 1
0
 public Boss_1_Turn(BattleTurnsModule btm) : base(btm)
 {
     _bfm = ModuleManager.getInstance.GetModule <BattlefieldModule>();
     _bui = ModuleManager.getInstance.GetModule <BattleUIModule>();
     _rmm = ModuleManager.getInstance.GetModule <RobotManagerModule>();
     _bim = ModuleManager.getInstance.GetModule <BattlefieldInputModule>();
 }
Ejemplo n.º 2
0
        public Boss_2_Turn(BattleTurnsModule btm) : base(btm)
        {
            _bfm = ModuleManager.getInstance.GetModule <BattlefieldModule>();
            _bui = ModuleManager.getInstance.GetModule <BattleUIModule>();
            _rmm = ModuleManager.getInstance.GetModule <RobotManagerModule>();
            _bim = ModuleManager.getInstance.GetModule <BattlefieldInputModule>();
            //创建自己body
            var boss_object = GameObject.Instantiate(Resources.Load("Prefabs/Boss/boss_2_body")) as GameObject;
            var wp          = Camera.main.ScreenToWorldPoint(new Vector3(Screen.width / 2, 0, 1));

            boss_object.transform.position = wp;
            boss_object.gameObject.SetActive(false);
            boss_body = boss_object.GetComponent <Boss_2_Body>();
        }
Ejemplo n.º 3
0
        IEnumerator LoadBattleScene(int level, int area)
        {
            yield return(0);

            var back = SceneManager.LoadSceneAsync("Battlefield");

            while (!back.isDone)
            {
                yield return(0);
            }

            _battleLogicObject.onupdate += Update;
            //-----------------

            //-----------------
            //
            _battleModule = ModuleManager.getInstance.GetModule <BattlefieldModule>();
            _battleModule.SelectLevel(area, level);

            ModuleManager.getInstance.StartModule <BattlefieldCameraModule>();
            ModuleManager.getInstance.StartModule <BattlefieldInputModule>();
            //UI mode 启动前置!
            ModuleManager.getInstance.StartModule <BattleUIModule>();
            ModuleManager.getInstance.StartModule <BattleTurnsModule>();
            ModuleManager.getInstance.StartModule <ShopUIModule>();

            //masktile管理
            ModuleManager.getInstance.StartModule <MaskTileModule>();

            //此处载入关卡数据mapdata
            ModuleManager.getInstance.StartModule <BattlefieldModule>();
            ModuleManager.getInstance.StartModule <RobotManagerModule>();
            ModuleManager.getInstance.StartModule <StarredModule>();

            _battleUIModule     = ModuleManager.getInstance.GetModule <BattleUIModule>();
            _battleInputModule  = ModuleManager.getInstance.GetModule <BattlefieldInputModule>();
            _robotManagerModule = ModuleManager.getInstance.GetModule <RobotManagerModule>();
            _battleTurnsModule  = ModuleManager.getInstance.GetModule <BattleTurnsModule>();
            _shopUIModule       = ModuleManager.getInstance.GetModule <ShopUIModule>();
            _controllerModule   = ModuleManager.getInstance.GetModule <BattleControllerModule>();
            _starredModule      = ModuleManager.getInstance.GetModule <StarredModule>();
            //这里尝试载入一下道具
            SaveLoader.getInstance.LoadPlayerCurItems(area);

            //加上mission回调
            MissionManager.getInstance.OnMissionValueHandler += OnMissionValue;

            _battleTurnsModule.NextTurn();
        }