private void Start() { weaponSystem = GetComponent <WeaponSystem>(); character = GetComponent <Character>(); abilities = GetComponent <SpecialAbilities>(); chatBox = FindObjectOfType <ChatBox>(); chatBox.AddChatEntry("You: I'm almost back to the village."); chatBox.AddChatEntry("You: What is that fort doing up ahead?"); RegisterForMouseEvent(); }
public void React() { if (!reacted) { reacted = true; chatBox.AddChatEntry(reaction); } }
public override void OnPlayerTouch(HSPlayer ply, HSPlayer other) { List <HSPlayer> plyColliding = new() { ply, other }; HSPlayer plySeeker = plyColliding.Where(x => x.Team is SeekerTeam).FirstOrDefault(); HSPlayer plyHider = plyColliding.Where(x => x.Team is HiderTeam).FirstOrDefault(); if (plySeeker is null || plyHider is null) { return; } ChatBox.AddChatEntry(To.Everyone, "", $"Seeker {plySeeker.GetClientOwner().Name} has caught {plyHider.GetClientOwner().Name}"); plyHider.Team = plySeeker.Team; if (HSGame.Instance.Hiders.Players.Count == 0) { teamWon(HSGame.Instance.Seekers); } }