Example #1
0
    public override void OnDamaged(IInteractable attacker, int damage, Vector2 knockback)
    {
        if (attacker.Equals(currentHead))
        {
            currentHead = null;
        }

        hitStateEndTime       = Time.time + 1f;
        attackEnabled         = false;
        spriteRenderer.sprite = HitBodySprite;

        base.OnDamaged(attacker, damage, knockback);
    }
Example #2
0
 private void LaunchHead()
 {
     currentHead = Instantiate(SpareHead, transform);
     currentHead.gameObject.SetActive(true);
     nextHeadLaunch = Time.time + HeadLaunchInterval;
 }