Beispiel #1
0
 public override bool Interact(HoldableObject carryingObject, PlayerInteraction playerInteraction)
 {
     if (carryingObject is Key && ((Key)carryingObject).keyCode == keyCode)
     {
         playerInteraction.Drop(true);
         locked = false;
         return(true);
     }
     else
     {
         return(false);
     }
 }
Beispiel #2
0
    public override bool Interact(HoldableObject carryingObject, PlayerInteraction playerInteraction)
    {
        if (hasBulb)
        {
            return(false);
        }

        if (carryingObject is LightBulb)
        {
            playerInteraction.Drop(true);
            hasBulb = true;
            LightToggle();
            return(true);
        }
        return(false);
    }