Esempio n. 1
0
        public async UniTask SetupAsync(CharaStatus status)
        {
            await base.SetupAsync();

            // プレイヤーが未生成ならば生成する
            // todo: Player情報は外から生成すること
            var model = Player.Model;
            var param = new CharaModel.Param();

            param.charaType = CharaType.Player;

            model.Setup(param);

            //var status = new CharaStatus(5, 100, 5, 0);
            model.SetStatus(status);
            status.Setup();

            Player.Setup();

            Controls.Add(Player);
            Models.Add(model);
        }
Esempio n. 2
0
        public static void Create(EnemyControlGroup controlGroup, EnemyControl control, MasterData.Chara.EnemyMaster enemyMaster)
        {
            var model = control.Model;
            var param = new CharaModel.Param();

            param.charaType = CharaType.Enemy;

            model.Setup(param);
            model.SetStatus(enemyMaster.Status);
            model.SetMaster(enemyMaster);

            model.Status.Setup();

            control.Setup();

            // AIの設定
            var attackAIFactory = new AI.Attack.AttackAIFactory(enemyMaster.AttackAIData);
            var moveAIFactory   = new AI.Move.MoveAIFactory(enemyMaster.MoveAIData);

            attackAIFactory.Attach(control, isResume: false);
            moveAIFactory.Attach(control, isResume: false);
        }