public void ActivateSwitch()
 {
     isActive = true;
     isActiveGlobal.RuntimeValue = isActive;
     thisDoor.Open();
     mySprite.sprite = activeSprite;
 }
Exemple #2
0
 public void ActivateSwitch()
 {
     active            = true;
     storedValue.value = active;
     mySprite.sprite   = activeSprite;
     thisDoor.Open();
 }
Exemple #3
0
    public void OpenLockedDoor(SkillSystem.SkEntity caster, SkillSystem.SkEntity monster)
    {
        LockedDoor ld = generator.CurrentDungeon.LockedDoorList.Find(it => it.IsOpen == false);

        if (ld != null)
        {
            ld.Open();
        }
    }
Exemple #4
0
    private void OnTriggerEnter(Collider collider)
    {
        Key key = collider.GetComponent <Key>();

        if (key != null)
        {
            AddKey(key.GetKeyType());
            Destroy(key.gameObject);
        }

        LockedDoor lockedDoor = collider.GetComponent <LockedDoor>();

        if (lockedDoor != null)
        {
            if (ContainsKey(lockedDoor.GetKeyType()))
            {
                lockedDoor.Open();
                if (lockedDoor.tag == "Final")
                {
                    SceneManager.LoadScene(sceneName);
                }
            }
        }
    }