示例#1
0
    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;
        }
    }
示例#2
0
    void Start () {
        wand = GetComponent<ChargeSpells>();
	}