protected override bool OnCondition(SubPhase phase, GameState state) { var playerIndex = trialVotes.Result; var player = state.GetPlayerByIndex(playerIndex); return(player.HasReached(state.GallowPoint.position)); }
protected override bool OnCondition(SubPhase phase, GameState state) { var requiredVotes = judgementVotes.GetRequiredVoteCount(); var voteCount = judgementVotes.VoteCount; var result = voteCount > requiredVotes; return(result); }
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)); }
protected void SetNextSubPhase(SubPhase votingPhase) { if (this.Phase == null) { return; } if (votingPhase == null) { return; } this.Phase.SetNextSubPhase(votingPhase); }
protected override bool OnCondition(SubPhase phase, GameState state) { var player = this.playerHandler.GetPlayerByIndex(this.trialVotes.Result); return(!player || player.IsDeathAnimationOver); }
public void SubPhaseStarted(SubPhase phase) { onSubPhaseStarted?.Invoke(phase); }
private void SetSubPhase(SubPhase subPhase) { this.subPhase = subPhase; }
protected override bool OnCondition(SubPhase phase, GameState state) { var alivePlayers = playerHandler.GetAlivePlayers(); return(alivePlayers.All(x => x.HasReached(x.House.GetWaypoint(1)))); }
protected abstract bool OnCondition(SubPhase phase, GameState state);
protected override bool OnCondition(SubPhase phase, GameState state) { return(gameUi.QueuedMessageCount == 0); }
public void SetNextSubPhase(SubPhase votingPhase) { this.nextSubPhaseIndexOverride = Array.IndexOf(this.subPhases, votingPhase); }
private void SetSubPhase(SubPhase nextSubPhase) { currentSubPhase = nextSubPhase; GameEvents.instance.SubPhaseStarted(nextSubPhase); }
protected override bool OnCondition(SubPhase phase, GameState state) { return(true); //var elapsed = Time.time - this.EnterTime; //return elapsed >= 10; }