private void Swipe() { if (GetDistanceFromTarget() <= meleeRange) { target.ReceiveDamage(100); //target.Knockback (Vector3.left, 2f); target.transform.Translate(-swipeKnockbackValue, 0.0f, 0.0f); } }
void Update() { if (isDamaged == true) { acidSpitTimer += Time.deltaTime; if (acidSpitTimer > acidSpitDuration) { acidSpitTimer = 0.0f; mechaman.ReceiveDamage((int)acidDamage); } } }