public void OutOfBasket() { PlayerIdentity id = PlayerManager.instance.thisPlayer.GetComponent <PlayerIdentity>(); if (id.IsSeeker()) { PlayerManager.instance.thisPlayer.GetComponent <HidingManager>().CmdFinishedAnimation(); } }
void OnTriggerEnter(Collider other) { if (other.gameObject.tag == "Player") { PlayerIdentity id = other.gameObject.GetComponent <PlayerIdentity>(); if (id.IsSeeker()) { NetworkManager.singleton.ServerChangeScene("seekerVictory"); } } }
bool validateStatus(Collider other) { if (ReferenceEquals(other, null)) { return(false); } PlayerIdentity otherId = other.gameObject.GetComponent <PlayerIdentity>(); HidingManager hidingManager = other.gameObject.GetComponent <HidingManager>(); if (ReferenceEquals(hidingManager, null)) { return(false); } // If the hunter clicks they can take the seeker out of hiding // All of this stuff needs to be synced to the server instead of just hopefully lining up // If the current player is the hunter and the collider they've run into is the Seeker and the Seeker isn't in hiding return(thisIsHunter && other.gameObject.tag == "Player" && otherId.IsSeeker() && !otherId.IsThisPlayer() && !hidingManager.IsHiding()); }