public override void Enter() { _controller.simpleAttackCount++; switch (_controller.simpleAttackCount) { case 1: _controller.animator.SetTrigger("Attack1"); break; case 2: _controller.animator.SetTrigger("Attack2"); break; case 3: _controller.animator.SetTrigger("Attack3"); break; } _controller.animator.SetBool("isChargingAttack", true); if (_controller.simpleAttackCount < _controller.attacksToCombo) { _attackObject = _controller.basicAttack; } else { _attackObject = _controller.comboAttack; _controller.simpleAttackCount = 0; } _controller.SetMovementControllerCombatState(_attackObject.attackTime); }
public override void Enter() { _attackObject = _controller.areaAttack; _controller.SetMovementControllerCombatState(_attackObject.attackTime); _controller.animator.SetTrigger("AreaAttack"); _controller.StopAreaAttackChargingSound_1(); _controller.AreaAttackSound(); if (UIHelperController.Instance.actionsToComplete.Contains(UIHelperController.HelperAction.SpinAttack)) { UIHelperController.Instance.DisableHelper(1, UIHelperController.HelperAction.SpinAttack); } }
public void OnTakeDamage(AttackSO attackSO, AttackSO.Type type) { if (armor > 0) { float armorDamage = attackSO.CalculateDamage(type, AttackSO.Phase.Armor); armor -= armorDamage; // TODO: impl. update the armor on UI Debug.LogFormat("Damage on {0} (Armor) -> amount: {1}", type, armorDamage); return; } float healthDamage = attackSO.CalculateDamage(type, AttackSO.Phase.Health); health -= healthDamage; // TODO: impl. update the health on UI Debug.LogFormat("Damage on {0} (Health) -> amount: {1}", type, healthDamage); if (health <= Mathf.Epsilon) { // TODO: impl. Enemy's death } }
void attack(AttackSO x) { curEr.value += x.radiation; canAttack = false; comboFlag = false; t.jumpEnabled = false; attackTime = x.anim.length / 2 - x.time;//divided by 2 because of the animationi speed ramp. cancelTime = x.time; attackSpeed = x.speed; attackHeight = x.height; t.velocity.y = attackHeight; t.speed = attackSpeed; t.rotateMultiplier = 0.25f; //Power Calculations attackPower = x.power + player.strength.value; //malice & Knockback malice = x.mv; knockback = x.knockback; knockup = x.knockup; //actual attacking stuff StartCoroutine(AttackTime(attackTime, cancelTime)); }
public CombatAbilities(AttackSO combat) { this.combat = combat; }