void OnChargeStateChangeHandler(ChargeSpells.CHARGESTATES chargeState) { switch (chargeState) { case ChargeSpells.CHARGESTATES.IDLE: ParticleSystem.EmissionModule em = ps.emission; em.enabled = false; break; case ChargeSpells.CHARGESTATES.CHARGING: ps.startSpeed = startSpeed; ps.startColor = chargingColor; ParticleSystem.EmissionModule em1 = ps.emission; em1.enabled = true; break; case ChargeSpells.CHARGESTATES.FULLCHARGE: ps.startSpeed = endSpeed; ps.startColor = chargedColor; break; } }
void Start () { wand = GetComponent<ChargeSpells>(); }