Ejemplo n.º 1
0
    private void Start()
    {
        // Reset timescale in case it was changed elsewhere
        Time.timeScale = 1;

        // Get player data
        playerData = VersusSetup.playerSetupData;

        // Create default player for testing
        if (playerData == null)
        {
            playerData = new List <PlayerSetupData>();
            playerData.Add(new PlayerSetupData()
            {
                inputType = "WASD"
            });
            playerData.Add(new PlayerSetupData()
            {
                inputType = "Arrows"
            });
            //playerData.Add(new PlayerSetupData() { inputType = "Joy1" });
            //playerData.Add(new PlayerSetupData() { inputType = "Joy2" });
        }

        players = new Dictionary <int, ShipController>();
        gamemode.SetupGame();

        if (useCountdown)
        {
            LockPlayers();
            gamemode.StartCountdown();
        }
    }