示例#1
0
 private void OnTriggerExit(Collider other)
 {
     if (other.tag == "Shop")
     {
         TriggeredShop?.Invoke(false);
         inShop           = false;
         Cursor.lockState = CursorLockMode.Locked;
         Cursor.visible   = false;
     }
 }
示例#2
0
    private void OnTriggerEnter(Collider other)
    {
        if (other.tag == "Shop")
        {
            TriggeredShop?.Invoke(true);
            inShop           = true;
            Cursor.lockState = CursorLockMode.None;
            Cursor.visible   = true;
        }

        if (other.name.Contains("BurntArea"))
        {
            SetOnFire();
        }
        if (other.name.Contains("Earthquake"))
        {
            ReceiveDamage(15f);
        }
        if (other.name.Contains("Charco"))
        {
            SetExhausted();
        }
    }