void initializeSpells() { dash = gameObject.AddComponent(typeof(Dash)) as Dash; rage = gameObject.AddComponent(typeof(Rage)) as Rage; spinAttack = gameObject.AddComponent(typeof(SpinAttack)) as SpinAttack; cut = gameObject.AddComponent(typeof(Cut)) as Cut; cripple = gameObject.AddComponent(typeof(Cripple)) as Cripple; }
public override void Initialize(GameObject obj) { cripple = obj.GetComponent <Cripple>(); cripple.crippleTrap = crippleTrap; cripple.damageToDeal = damageToDeal; cripple.speedDivisor = speedDivisor; cripple.slowedDuration = slowedDuration; cripple.maxTrapLifetime = maxTrapLifetime; cripple.Setup(); }