示例#1
0
 private void GettingAwayFromCarrot()
 {
     if (_targetToPick != null)
     {
         _targetToPick.GetComponent <CarrotBehaviour>().OnTargetExit();
         _targetToPick    = null;
         IsTouchingCarrot = false;
         _playerConfig.ActionButtonHandler.CheckButtonToShow();
     }
 }
示例#2
0
 private void Start()
 {
     Energyimg  = Energy.GetComponent <SpriteRenderer>().sprite;
     Carrotimg  = Carrot.GetComponent <SpriteRenderer>().sprite;
     Pickelimg  = Pickel.GetComponent <SpriteRenderer>().sprite;
     Taimatuimg = Taimatu.GetComponent <SpriteRenderer>().sprite;
     Sekibanimg = Sekiban.GetComponent <SpriteRenderer>().sprite;
     ActionbtnA.SetActive(false); ActionbtnB.SetActive(false);
     LadderSwitch = false;
     Item0sprite.GetComponent <Image>().sprite = nullimg; Item1sprite.GetComponent <Image>().sprite = nullimg;
 }
示例#3
0
 private void OnTriggerEnter(Collider other)
 {
     if (other.CompareTag("Carrot") && !_onMyArea && !_playerConfig.Inventory.IsFull)
     {
         if (_showDebugMessages)
         {
             Debug.Log("Colliding with some carrot: " + other.gameObject.name);
         }
         _targetToPick = other.GetComponent <Carrot>();
         _targetToPick.GetComponent <CarrotBehaviour>().OnTargetEnter();
         IsTouchingCarrot = true;
         _playerConfig.ActionButtonHandler.CheckButtonToShow();
     }
 }