public void StartGame()
    {
        GameObject      ob       = Instantiate(teamTransporterPrefab, Vector3.zero, Quaternion.identity) as GameObject;
        TeamTransporter tTranspo = ob.GetComponent <TeamTransporter>();

        General.PlayerController cnt1 = GetTeamController("Team1Controller");
        General.PlayerController cnt2 = GetTeamController("Team2Controller");

        tTranspo.SetTeams(team1, cnt1, team2, cnt2);
        SceneManager.LoadScene("Game");
    }
Example #2
0
    public void SetTeams(Team t1, General.PlayerController t1Controller, Team t2, General.PlayerController t2Controller)
    {
        team1           = new Team();
        team1.name      = t1.name;
        team1.sprite    = t1.sprite;
        team1Controller = t1Controller;

        team2           = new Team();
        team2.name      = t2.name;
        team2.sprite    = t2.sprite;
        team2Controller = t2Controller;
    }