public void OnStart(IGamePlayable _gamePlayable, int _dice) { if (_gamePlayable.CharacterRef != characterRef) { return; } diceCount = _dice; OnStartTurn?.Invoke(); Select(true); StartCoroutine(AIFSM()); }
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(); } }
public void StartTurn() { state.StartTurn(this); OnStartTurn?.Invoke(); }