protected override bool OnCondition(SubPhase phase, GameState state)
    {
        var playerIndex = trialVotes.Result;
        var player      = state.GetPlayerByIndex(playerIndex);

        return(player.HasReached(state.GallowPoint.position));
    }
示例#2
0
    protected override bool OnCondition(SubPhase phase, GameState state)
    {
        var requiredVotes = judgementVotes.GetRequiredVoteCount();
        var voteCount     = judgementVotes.VoteCount;
        var result        = voteCount > requiredVotes;

        return(result);
    }
示例#3
0
        public override string ToString()
        {
            JSONObject json = new JSONObject();

            json.AddField("command", Type.ToString());
            json.AddField("subphase", (SubPhase != null) ? SubPhase.ToString() : null);
            json.AddField("parameters", new JSONObject(RawParameters));
            return(json.ToString());
        }
    protected override bool OnCondition(
        SubPhase phase,
        GameState state)
    {
        var playerIndex   = this.trialVotes.Result;
        var player        = state.GetPlayerByIndex(playerIndex);
        var outsideGallow = player.House.GetWaypoint(1);

        return(player.HasReached(outsideGallow));
    }
示例#5
0
 protected void SetNextSubPhase(SubPhase votingPhase)
 {
     if (this.Phase == null)
     {
         return;
     }
     if (votingPhase == null)
     {
         return;
     }
     this.Phase.SetNextSubPhase(votingPhase);
 }
示例#6
0
    protected override bool OnCondition(SubPhase phase, GameState state)
    {
        var player = this.playerHandler.GetPlayerByIndex(this.trialVotes.Result);

        return(!player || player.IsDeathAnimationOver);
    }
示例#7
0
 public void SubPhaseStarted(SubPhase phase)
 {
     onSubPhaseStarted?.Invoke(phase);
 }
示例#8
0
 private void SetSubPhase(SubPhase subPhase)
 {
     this.subPhase = subPhase;
 }
示例#9
0
    protected override bool OnCondition(SubPhase phase, GameState state)
    {
        var alivePlayers = playerHandler.GetAlivePlayers();

        return(alivePlayers.All(x => x.HasReached(x.House.GetWaypoint(1))));
    }
示例#10
0
 protected abstract bool OnCondition(SubPhase phase, GameState state);
 protected override bool OnCondition(SubPhase phase, GameState state)
 {
     return(gameUi.QueuedMessageCount == 0);
 }
示例#12
0
 public void SetNextSubPhase(SubPhase votingPhase)
 {
     this.nextSubPhaseIndexOverride = Array.IndexOf(this.subPhases, votingPhase);
 }
示例#13
0
 private void SetSubPhase(SubPhase nextSubPhase)
 {
     currentSubPhase = nextSubPhase;
     GameEvents.instance.SubPhaseStarted(nextSubPhase);
 }
示例#14
0
 protected override bool OnCondition(SubPhase phase, GameState state)
 {
     return(true);
     //var elapsed = Time.time - this.EnterTime;
     //return elapsed >= 10;
 }