public MafiaRole(String title = "vanilla", String description = "The vanilla towny with no actual powers.", Allignment allignment = Allignment.Town, Wincon wincon = Wincon.DefeatMafia, string rolePM = "") { this.allignment = allignment; this.wincon = wincon; this.Title = title; this.description = description; this.rolePM = rolePM; canVote = true; canVoteNow = false; }
public Vanilla(Allignment allignment, string username) { if (allignment == Allignment.Town) { this.Title = "Vanilla"; this.description = "You do not have any night actions."; this.allignment = Allignment.Town; this.wincon = Wincon.DefeatMafia; this.rolePM = $"Dear **{username}**,\n\nYou are the most basic of roles in existence,\nYou are the **{Title}**.\n\n{description}\n\nYou win with the **Town** whose goal is to defeat all members of the Mafia."; } if (allignment == Allignment.Mafia) { this.Title = "Goon"; this.description = "You have the power to vote in the Mafia Chat every night on whom to kill."; this.allignment = Allignment.Mafia; this.wincon = Wincon.OutnumberTown; this.rolePM = $"Dear **{username}**,\n\nYou are the most basic of the mafia-aligned roles in existence,\nYou are the **{Title}**.\n\n{description}\n\nYou win with the **Mafia** whose goal is to outnumber all members of the Town"; } }
private void OnGUI() { GUILayout.BeginHorizontal(); if (GUILayout.Button("N", GUILayout.Width(20))) { note = string.Empty; } if (GUILayout.Button("S", GUILayout.Width(20))) { saveNote.note = note; } switch (allignment) { case Allignment.left: allignmentButtonText = "<"; break; case Allignment.centered: allignmentButtonText = "|"; break; case Allignment.right: allignmentButtonText = ">"; break; default: break; } if (GUILayout.Button(allignmentButtonText, GUILayout.Width(20))) { if ((int)allignment == 2) { allignment = 0; } else { allignment += 1; } } GUIStyle GUIAlligment = new GUIStyle(); switch (allignment) { case Allignment.left: GUIAlligment.alignment = TextAnchor.UpperLeft; break; case Allignment.centered: GUIAlligment.alignment = TextAnchor.UpperCenter; break; case Allignment.right: GUIAlligment.alignment = TextAnchor.UpperRight; break; default: break; } note = GUI.TextArea(new Rect(0, 40, Screen.width, Screen.height), note, GUIAlligment); GUILayout.EndHorizontal(); }