コード例 #1
0
    void Explode()
    {
        SingleHitAttack attack = Instantiate(bomb_attack);

        attack.SetSource(owner);
        attack.SetOnHit(on_hit);
        attack.Enable();
        attack.StartCoroutine(DisableAfter(attack, active_hitbox_length));

        attack.transform.position = transform.position;

        Destroy(gameObject);
    }
コード例 #2
0
 public override void SetCharacter(Character character)
 {
     base.SetCharacter(character);
     attack.SetSource(character);
     attack.SetOnHit(OnHit);
 }
コード例 #3
0
    protected void Awake()
    {
        NormalizeAnimationCurves();

        attack.SetOnHit(AttackOnHit);
    }