public override void Interact(ref GameObject other) { if (CanInteract(other)) { other.SetActive(true); PutMask(other); changeObjectsStage(); _player.RemoveItemFromInventory(); } }
public override void Interact(ref GameObject other) { if (CanInteract(other)) { this.gameObject.GetComponent <SpriteRenderer> ().enabled = true; this.gameObject.tag = "Pickup"; Enemy.EnableMovement(true); _player.RemoveItemFromInventory(); } }
public override void Interact(ref GameObject other) { if (CanInteract(other)) { if (other.GetComponent <StageObject>().ID == (int)IDList.ID.Key) { InsertKey(); _player.RemoveItemFromInventory(); } else if (other.GetComponent <StageObject>().ID == (int)IDList.ID.Gear) { InsertGear(); if (_gears <= _maxGears) { _sfxManager.PlaySFX(InsertMechanismClip, InsertMechanismVolume); _player.RemoveItemFromInventory(); } } } }
public override void Interact (ref GameObject other) { if(CanInteract (other)) { if(other.GetComponent<StageObject>().ID == (int)IDList.ID.Torch && _hasBall) { _collider.enabled = false; _controlled = true; _player.CanMove = false; _aim.SetActive (true); _camera.LockCamera (true); _stageSwap.LockSwap (); _playerAC.SetFloat("Speed", 0f); } else if(other.GetComponent<StageObject>().ID == (int)IDList.ID.CannonBall) { _hasBall = true; _playerPick.RemoveItemFromInventory (); } } }