Exemplo n.º 1
0
 private void GoInside()
 {
     _inBuilding = true;
     _insideArea.SetActive(true);
     _outsideArea.SetActive(false);
     PlayerExtension.GetPlayerObject().transform.position = _inSidesPoint.position;
     BlackScreenEvent.ShowBlackScreen();
     DayNightCycleEvent.SwitchLight();
 }
Exemplo n.º 2
0
 private void Initialize()
 {
     _parent = transform.parent;
     foreach (Transform child in transform)
     {
         _mugSlot.Add(child);
     }
     _keeperInventory = PlayerExtension.GetPlayerObject().GetComponent <InkeeperInventory>();
 }
Exemplo n.º 3
0
    private void OnTriggerEnter(Collider other)
    {
        if (other.gameObject.layer == 10)
        {
            other.GetComponent <IDamage>().TakeDamage(_damage, PlayerExtension.GetPlayerObject().transform.position);
            if (!other.CompareTag("Imp"))
            {
                AttachToBody(other);
            }
            _sound.PlayOneShot(_sound.clip, 0.1f);
            Invoke("DisableObject", 13f);
            _trail.Stop();
        }

        if (other.gameObject.layer == 14)
        {
            TurnOffBody();
            _sound.PlayOneShot(_sound.clip, 0.1f);
            Invoke("DisableObject", 13f);
            _trail.Stop();
        }
    }
Exemplo n.º 4
0
 private void Start()
 {
     _target = PlayerExtension.GetPlayerObject();
 }