Exemplo n.º 1
0
/*
 *  public void Observe(SlugEvents ev) {
 *      if (ev == SlugEvents.HitGround) {
 *          bounceCount++;
 *          ZRotationStepCurrent *= 2;
 *          if (bounceCount >= bouncesToExplode) {
 *              Explode();
 *          }
 *      }
 *  }
 */
    private void Explode(Collider2D col)
    {
        ProjectileUtils.ImpactAnimationAndSound(transform, col, properties);
        ProjectileUtils.NotifyCollider(col, properties);
        explosionWave.CastAOE("enemy", transform.position);
        gameObject.SetActive(false);
    }
Exemplo n.º 2
0
    public void Execute(string victimTag, Vector3 unused, Vector3 unused2)
    {
        if (attackSwitch)
        {
            anim.SetTrigger("knife2");
            audioManager.PlaySound(4);
        }
        else
        {
            anim.SetTrigger("knife");
            audioManager.PlaySound(5);
        }
        attackSwitch = !attackSwitch;

        knife.CastAOE(victimTag, transform.position);
        EventManager.TriggerEvent(GlobalEvents.KnifeUsed);
        timeUtils.TimeDelay(0.3f, () => { anim.SetBool("knifeing", false); });
    }
Exemplo n.º 3
0
 public void AEKnifeIsOut()
 {
     knife.CastAOE(victimsTag, transform.position);
 }
Exemplo n.º 4
0
 private void Attack()
 {
     topBody.SetActive(true);
     bottomBodyAnimator.SetBool("attack", true);
     knife.CastAOE("Player", transform.position);
 }