Exemplo n.º 1
0
    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>();
        }
    }
Exemplo n.º 2
0
 public LastWordsPhase(
     GameUI gameUI,
     JudgementVoteHandler judgementVotes,
     float duration)
     : base("Last words", duration)
 {
     gameUi = gameUI;
     this.judgementVotes = judgementVotes;
 }
Exemplo n.º 3
0
 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;
 }
Exemplo n.º 5
0
 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;
 }
Exemplo n.º 6
0
 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;
 }
Exemplo n.º 7
0
    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;
    }