//public Animator transitionObject; /** * Créer une partie */ public static ExecGame MakeExecGame() { GameObject go = new GameObject("ExecGameInstance"); ExecGame execGame = go.AddComponent <ExecGame>(); return(execGame); }
/** * Créer une manche */ public static Round MakeRound(ExecGame game) { GameObject go = new GameObject("RoundInstance"); Round round = go.AddComponent<Round>(); Victims victims = go.AddComponent<Victims> (); round.game = game; return round; }
/** * Démarrage d'une partie */ public void Start() { for (int i = 0; i < 4; i++) { joypads[i] = new Joypad(i); } // Lancement d'une partie game = ExecGame.MakeExecGame(); }
/** * Créer une manche */ public static Round MakeRound(ExecGame game) { GameObject go = new GameObject("RoundInstance"); Round round = go.AddComponent <Round>(); Victims victims = go.AddComponent <Victims> (); round.game = game; return(round); }
/** * Créer une voteState */ public static VoteState MakeVoteState(Round round, ExecGame game) { bool voteStarted = false; if (voteStarted == false) { GameObject go = new GameObject ("VoteState"); vs = go.AddComponent<VoteState> (); vs.transform.SetParent (round.transform); vs.round = round; vs.game = game; voteStarted = true; } return vs; }
/** * Créer une voteState */ public static VoteState MakeVoteState(Round round, ExecGame game) { bool voteStarted = false; if (voteStarted == false) { GameObject go = new GameObject("VoteState"); vs = go.AddComponent <VoteState> (); vs.transform.SetParent(round.transform); vs.round = round; vs.game = game; voteStarted = true; } return(vs); }