private void DealDamage(Character_Stats targetsStats) { print("Test2"); if (targetsStats) { print("Test3"); targetsStats.TakeDamage(characterStats.GetStrength(), 0, CalculateKnockbackPower(targetsStats.GetComponent <Transform>())); } }
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>(); }
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; }
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); }
private void SetUpRefrences() { characterStats = this.GetComponent <Character_Stats>(); }
private void DealDamage(Character_Stats targetStats) { //targetStats.KnockingBack(20f, 0.25f, -Vector3.up); targetStats.TakeDamage(totalPhysicalDamage, totalMagicalDamage, CalculateKnockbackPower(targetStats.transform)); }