예제 #1
0
    public void OutOfBasket()
    {
        PlayerIdentity id = PlayerManager.instance.thisPlayer.GetComponent <PlayerIdentity>();

        if (id.IsSeeker())
        {
            PlayerManager.instance.thisPlayer.GetComponent <HidingManager>().CmdFinishedAnimation();
        }
    }
예제 #2
0
    void OnTriggerEnter(Collider other)
    {
        if (other.gameObject.tag == "Player")
        {
            PlayerIdentity id = other.gameObject.GetComponent <PlayerIdentity>();

            if (id.IsSeeker())
            {
                NetworkManager.singleton.ServerChangeScene("seekerVictory");
            }
        }
    }
예제 #3
0
    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());
    }