void Start() { this.validator = new GamePhaseValidator(); this.trialVoteHandler = new TrialVoteHandler(this); this.judgementVoteHandler = new JudgementVoteHandler(this); if (!SunLight) { SunLight = GameObject.Find("Directional Light").GetComponent <Light>(); } this.startPhase = new StartPhase(); this.endPhase = new EndPhase(); this.gameUI = this.GetComponent <GameUI>(); if (!playerHandler) { playerHandler = this.GetComponent <PlayerHandler>(); } if (Players == null || Players.Length == 0) { Players = GameObject.FindObjectsOfType <PlayerController>(); } if (!Camera) { Camera = GameObject.FindObjectOfType <WaypointCamera>(); } }
public MoveToGallowsPhase( GameUI gameUI, TrialVoteHandler trialVotes, PlayerHandler playerHandler) : base("Move to gallows") { gameUi = gameUI; this.trialVotes = trialVotes; this.playerHandler = playerHandler; }
public GoHomePhase( GameUI gameUI, TrialVoteHandler trialVotes, PlayerHandler playerHandler) : base("Day is over - going home") { gameUi = gameUI; this.trialVotes = trialVotes; this.playerHandler = playerHandler; }
public DefensePhase( GameUI gameUI, PlayerHandler playerHandler, TrialVoteHandler trialVotes, float duration) : base("Defense", duration) { gameUi = gameUI; this.playerHandler = playerHandler; this.trialVotes = trialVotes; }
public TrialVotingPhase( GameUI gameUI, PlayerHandler playerHandler, TrialVoteHandler voteHandler, float duration) : base("Voting", duration) { gameUi = gameUI; this.playerHandler = playerHandler; this.voteHandler = voteHandler; }
public LeaveGallowsPhase( GameUI gameUI, PlayerHandler playerHandler, TrialVoteHandler trialVotes, JudgementVoteHandler judgementVotes) : base("Player is innocent - leaving gallows") { gameUi = gameUI; this.playerHandler = playerHandler; this.trialVotes = trialVotes; this.judgementVotes = judgementVotes; }
public ReviewExecutionPhase( GameUI gameUI, PlayerHandler playerHandler, TrialVoteHandler trialVotes, JudgementVoteHandler judgementVote) : base("Execution Review") { gameUi = gameUI; this.playerHandler = playerHandler; this.trialVotes = trialVotes; this.judgementVote = judgementVote; }
public JudgementPhase( GameUI gameUI, PlayerHandler playerHandler, TrialVoteHandler trialVotes, JudgementVoteHandler judgementVotes, float duration) : base("Judgement", duration) { gameUi = gameUI; this.playerHandler = playerHandler; this.trialVotes = trialVotes; this.judgementVotes = judgementVotes; }
public ExecutionPhase( GameUI gameUI, WaypointCamera camera, PlayerHandler playerHandler, TrialVoteHandler trialVotes, JudgementVoteHandler judgementVote) : base("Execution") { gameUi = gameUI; this.camera = camera; this.playerHandler = playerHandler; this.trialVotes = trialVotes; this.judgementVote = judgementVote; }
public NightPhase( Action <Phase> onEnter, Action <Phase> onExit, GameUI gameUI, TrialVoteHandler trialVotes, PlayerHandler playerHandler, bool standardMode) : base( "Night", new GoHomePhase( gameUI, trialVotes, playerHandler), new DuringNightPhase(standardMode ? 30f : 15f)) { this.onEnter = onEnter; this.onExit = onExit; this.playerHandler = playerHandler; }
public DayPhase( Action <Phase> onEnter, Action <Phase> onExit, GameUI gameUI, WaypointCamera camera, PlayerHandler playerHandler, TrialVoteHandler trialVoteHandler, JudgementVoteHandler judgementVoteHandler, bool standardMode) : base( "Day", new GotoTownPhase(playerHandler), new ReviewNightPhase(playerHandler), new DiscussionPhase( 5f), //standardMode ? 45f : 15f)), new TrialVotingPhase( gameUI, playerHandler, trialVoteHandler, 30f), new MoveToGallowsPhase( gameUI, trialVoteHandler, playerHandler), new DefensePhase( gameUI, playerHandler, trialVoteHandler, 5f), //20f), new JudgementPhase( gameUI, playerHandler, trialVoteHandler, judgementVoteHandler, 20f), new LeaveGallowsPhase( gameUI, playerHandler, trialVoteHandler, judgementVoteHandler), new LastWordsPhase( gameUI, judgementVoteHandler, 5f), new ExecutionPhase( gameUI, camera, playerHandler, trialVoteHandler, judgementVoteHandler), new ReviewExecutionPhase( gameUI, playerHandler, trialVoteHandler, judgementVoteHandler) ) { this.onEnter = onEnter; this.onExit = onExit; this.playerHandler = playerHandler; this.trialVoteHandler = trialVoteHandler; this.judgementVoteHandler = judgementVoteHandler; }