Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using UnityEngine;
- using System.Collections;
- public class SpellManager : MonoBehaviour
- {
- public enum Spell { FireSpell, IceLance, Corruption }
- public Spell _currentSpell;
- float _spellCd;
- float GetSpellCd(Spell _spell)
- {
- switch (_spell)
- {
- case Spell.FireSpell:
- _spellCd = 2f;
- break;
- case Spell.IceLance:
- _spellCd = 0.5f;
- break;
- }
- return _spellCd;
- }
- void Start()
- {
- print(GetSpellCd(Spell.IceLance));
- print(GetSpellCd(Spell.FireSpell));
- }
- void Update()
- {
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement