コード例 #1
0
 public void OnStart(IGamePlayable _gamePlayable, int _dice)
 {
     if (_gamePlayable.CharacterRef != characterRef)
     {
         return;
     }
     diceCount = _dice;
     OnStartTurn?.Invoke();
     Select(true);
     StartCoroutine(AIFSM());
 }
コード例 #2
0
ファイル: TimeManager.cs プロジェクト: Sonorh/AntNestProt
 public void Next()
 {
     OnEndOfTurn?.Invoke();
     if (Now == Weeks.DecemberFourth)
     {
         Year++;
         Now = Weeks.JanuaryFirst;
     }
     else
     {
         Now++;
     }
     OnTimeChanged?.Invoke();
     OnStartTurn?.Invoke();
 }
        public void StartTurn()
        {
            actionAgentList = new List <object>();

            if (!PlayerSkillEffectStatuses.Any(x => x.effector is TargetStopActionSkillEffector))
            {
                actionAgentList.Add(Player);
            }
            for (int i = 0; i < Monsters.Count; i++)
            {
                if (!MonstersSkillEffectStatuses[i].Any(x => x.effector is TargetStopActionSkillEffector) && MonsterBattleFactors[i].healthPoint > 0)
                {
                    actionAgentList.Add(i);
                }
            }

            actionAgentList.OrderByDescending(x =>
            {
                if (x is Player)
                {
                    BattleFactors playerBF = Player.BattleFactors;
                    PlayerSkillEffectStatuses.ForEach(y => y.effector.Use(playerBF, null));
                    return(playerBF.speedPoint);
                }
                else
                {
                    return(MonsterBattleFactors[(int)x].speedPoint);
                }
            });
            if (MonsterBattleFactors.Any(x => x.healthPoint > 0))
            {
                OnStartTurn?.Invoke();
                ProcessTurn();
            }
            else
            {
                EndBattle();
            }
        }
コード例 #4
0
 public void StartTurn()
 {
     state.StartTurn(this);
     OnStartTurn?.Invoke();
 }