Exemple #1
0
 public override void Interact(ref GameObject other)
 {
     if (CanInteract(other))
     {
         other.SetActive(true);
         PutMask(other);
         changeObjectsStage();
         _player.RemoveItemFromInventory();
     }
 }
Exemple #2
0
 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();
     }
 }
Exemple #3
0
 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();
             }
         }
     }
 }
Exemple #4
0
	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 ();
			}
		}
	}