Example #1
0
    public override void SeekerInteraction(Collider thisPlayer)
    {
        HidingManager hidingManager = thisPlayer.gameObject.GetComponent <HidingManager>();

        // Put the Seeker into hiding mode
        // Don't let them move and make them invisible
        if (!hidingManager.IsHiding())
        {
            hidingManager.CmdHideInObject(basketGameObject);
        }
        else
        {
            hidingManager.CmdStopHiding();
        }
    }
Example #2
0
    public override void SeekerInteraction(Collider thisPlayer)
    {
        HidingManager    hidingManager = thisPlayer.gameObject.GetComponent <HidingManager>();
        PlayerMovement3D movement      = thisPlayer.gameObject.GetComponent <PlayerMovement3D>();

        if (!hidingManager.IsHiding())
        {
            hidingManager.CmdHideInArea();
            movement.onGrass = false;
            movement.inGrass = true;
        }
        else
        {
            hidingManager.CmdStopHiding();
            movement.onGrass = true;
            movement.inGrass = false;
        }
    }
Example #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());
    }