コード例 #1
0
 private void SetRefrences()
 {
     characterStats   = this.GetComponentInParent <Character_Stats>();
     anim             = this.GetComponent <Animator>();
     equipmentManager = this.GetComponentInParent <Equipment_Manager>();
     equipmentManager.equipBodyArmour       += SetCurrentArmour;
     equipmentManager.restartAnimationEvent += RestartAnimation;
     equipmentManager.equipWeapon           += SetCurrentWeapon;
     //characterStats.amWalking += SetWalking;
     animCon = this.GetComponentInParent <Animator_Controller>();
     animCon.callingAttack += Attack;
 }
コード例 #2
0
 private void SetRefrences()
 {
     questJornal    = this.GetComponent <Quest_Jornal>();
     characterStats = this.GetComponent <Character_Stats>();
     if (nPC)
     {
         shopIconParent = GameObject.FindObjectsOfType <Shop_Icon_Parent>()[0].GetComponent <Transform>();
         shopIconParent.GetComponentInParent <Shop_UI_Manager>().gameObject.SetActive(false);
         if (Object.FindObjectsOfType <Shop_Icon_Parent>().Length > 1)
         {
             Debug.LogError("TWO OR MORE SHOP_ICON_PARENTS DETECTED");
         }
     }
     equipmentManager   = this.GetComponent <Equipment_Manager>();
     uiInventoryManager = GameObject.FindObjectOfType <UI_Inventory_Manager>();
 }