Beispiel #1
0
 private void DealDamage(Character_Stats targetsStats)
 {
     print("Test2");
     if (targetsStats)
     {
         print("Test3");
         targetsStats.TakeDamage(characterStats.GetStrength(), 0, CalculateKnockbackPower(targetsStats.GetComponent <Transform>()));
     }
 }
Beispiel #2
0
 private void SetRefrences()
 {
     rb             = this.GetComponent <Rigidbody2D>();
     characterStats = this.GetComponent <Character_Stats>();
     animCon        = this.GetComponent <Animator_Controller>();
     hitBox         = this.GetComponent <CapsuleCollider2D>();
     //characterStats.KnockingBack += KnockBack;
     characterStats.callingDeath += SetDead;
     player      = characterStats.gameObject;
     followMouse = GameObject.FindObjectOfType <Follow_Mouse>();
 }
Beispiel #3
0
 private void SetRefrences()
 {
     playerAnim                              = this.GetComponent <Animator>();
     weaponAnim                              = this.GetComponentInChildren <Weapon_Controller>().GetComponent <Animator>();
     armourAnim                              = this.GetComponentInChildren <Armour_Controller>().GetComponent <Animator>();
     charStats                               = this.GetComponent <Character_Stats>();
     equipmentManager                        = this.GetComponent <Equipment_Manager>();
     equipmentManager.equipWeapon           += EquipWeaponForAnim;
     charStats.callingDeath                 += LiveOrDie;
     callingAttack                          += BodyAttackAnim;
     equipmentManager.restartAnimationEvent += AnimationSyncer;
 }
Beispiel #4
0
        private void SetRefrences()
        {
            anim = this.GetComponent <Animator>();

            animCon   = this.GetComponentInParent <Animator_Controller>();
            aIAnimCon = this.GetComponentInParent <AI_Animator_Controller>();

            characterStats   = this.GetComponentInParent <Character_Stats>();
            equipmentManager = this.GetComponentInParent <Equipment_Manager>();
            hitBox           = this.GetComponent <PolygonCollider2D>();
            //cloneAnimOveride = Instantiate(animOveride);
        }
Beispiel #5
0
 private void SetUpRefrences()
 {
     characterStats = this.GetComponent <Character_Stats>();
 }
Beispiel #6
0
 private void DealDamage(Character_Stats targetStats)
 {
     //targetStats.KnockingBack(20f, 0.25f, -Vector3.up);
     targetStats.TakeDamage(totalPhysicalDamage, totalMagicalDamage, CalculateKnockbackPower(targetStats.transform));
 }