public void Init(StateHandeler stateHandeler, List <PlayerKit> playerKits)
    {
        this.stateHandeler = stateHandeler;
        this.playerKits    = playerKits;

        RegisterEvents();
    }
示例#2
0
    // 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();
    }
示例#3
0
    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();
    }