protected override void Effect() { base.Effect(); GameObject g = Instantiate(HitBox, Caster.transform.position, Quaternion.identity); Vector3 scale = Vector3.one; scale.x = direction; g.transform.localScale = scale; HitBox hb = g.GetComponent <HitBox>(); hb.InitHitBox(Caster.gameObject, Damage, Caster.camp, canBlock, canParry); Destroy(g, duration); }
private void SingleAttack() { print(attackIndex); direction = Caster.InputDirectionRight ? 1 : -1; GameObject g = Instantiate(HitBox[attackIndex], Caster.transform.position, Quaternion.identity); Vector3 scale = Vector3.one; scale.x = direction; g.transform.localScale = scale; HitBox hb = g.GetComponent <HitBox>(); hb.InitHitBox(Caster.gameObject, Damage, Caster.camp, canBlock, canParry); Destroy(g, duration); }