public void UpdateMP(float value) { EventDispatcher.CallEvent("update_mp_" + partyID, new Dictionary <string, object>() { { "current", stats.SetMP(value) }, { "max", stats.GetStats(UnitStat.MaxMP) } }); }
protected override void OnEnter() { context.SetLastState(BattleState.Input); if (!context.storyBoard.IsFinished()) { context.ChangeBattleState(BattleState.Event); return; } EventDispatcher.CallEvent("on_player_turn", null); context.SetTeam(context.playerParty); BattleUI.Instance.ShowExecuteButton(true); BattleUI.Instance.SetButtonFunction(Execute); }
public void Init() { EventDispatcher.CallEvent("update_hp_" + partyID, new Dictionary <string, object>() { { "current", stats.GetCurrentStats(UnitStat.HP) }, { "max", stats.GetStats(UnitStat.MaxHP) } }); EventDispatcher.CallEvent("update_mp_" + partyID, new Dictionary <string, object>() { { "current", stats.GetCurrentStats(UnitStat.MP) }, { "max", stats.GetStats(UnitStat.MaxMP) } }); }
void Execute() { context.ExecuteTurn(); EventDispatcher.CallEvent("on_player_turn_execute", null); BattleUI.Instance.ShowExecuteButton(false); }