예제 #1
0
    // Send out a circle to some distance
    // Draw it as it goes along the ground ideally
    void UseEcho()
    {
        // First check if the player is even within their range
        if (PlayerManager.instance.otherPlayer)
        {
            float distanceToSeeker = Vector3.Distance(PlayerManager.instance.otherPlayer.transform.position, transform.position);

            if (distanceToSeeker <= echoSphereRadius)
            {
                Collider[] hitColliders = Physics.OverlapSphere(transform.position, echoSphereRadius, hidingPlaceLayerMask);

                int i = 0;
                while (i < hitColliders.Length)
                {
                    // Kick the Seeker out of their hiding place
                    if (hidingManager)
                    {
                        hidingManager.EmitParticlesOnNextFind();
                        hidingManager.CheckHidingPlace(hitColliders[i].gameObject);
                    }
                    i++;
                }
            }
        }

        RpcRenderEchoEffect();
        sfxManager.PlayEcho();
    }
예제 #2
0
    public override void HunterInteraction(Collider thisPlayer)
    {
        // If the Seeker is in this hiding place, remove them from hiding but don't immediately capture them
        // Call on the seeker object because it was easier thanks to networking issues....
        HidingManager hidingManager = otherPlayer.gameObject.GetComponent <HidingManager>();

        hidingManager.CheckHidingPlace(basketGameObject);
    }