public void Pickup(Transform player)
 {
     door.Unlock();
     // enter log
     UiLog.Log(pickupLog);
     AudioSource.PlayClipAtPoint(pickupSound, transform.position);
     Destroy(gameObject);
 }
Exemplo n.º 2
0
    public override void Activate()
    {
        actionFinished = false;
        float actualWaitOpenTime = waitOpenTime;

        if (!open)
        {
            if (Unlockable())
            {
                // nicht durch die tuer gehen sondern erst aufschliessen
                Unlock();
                otherDoor.Unlock();
                actualWaitOpenTime += unlockTime + waitAfterUnlockTime;
            }
            else
            {
                // locked - keine Action
                return;
            }
        }
        StartCoroutine(WalkThroughDoor(actualWaitOpenTime));
    }