public void Init(StateHandeler stateHandeler, List <PlayerKit> playerKits) { this.stateHandeler = stateHandeler; this.playerKits = playerKits; RegisterEvents(); }
// Start is called before the first frame update void Start() { stateHandeler = new StateHandeler(states, startingState); RegisterEvents(); gr = gameRulesPrefab.GetComponent <GameRules>(); gr.Init(stateHandeler); BuildGame(); nextState = stateHandeler.StateChange(); }
public void Init(StateHandeler stateHandeler) { lobbyTimer = new Timer(); gameStartTimer = new Timer(); matchTimer = new Timer(); roundTimer = new Timer(); players = new Dictionary <Gamepad, GameObject>(); playerKits = new List <PlayerKit>(); this.stateHandeler = stateHandeler; Debug.Log(stateHandeler); RegisterEvents(); }