Advertisement
Guest User

Untitled

a guest
Aug 1st, 2014
207
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.67 KB | None | 0 0
  1. using UnityEngine;
  2. using System.Collections;
  3.  
  4. public class SpellManager : MonoBehaviour
  5. {
  6. public enum Spell { FireSpell, IceLance, Corruption }
  7. public Spell _currentSpell;
  8.  
  9. float _spellCd;
  10.  
  11. float GetSpellCd(Spell _spell)
  12. {
  13. switch (_spell)
  14. {
  15. case Spell.FireSpell:
  16. _spellCd = 2f;
  17. break;
  18. case Spell.IceLance:
  19. _spellCd = 0.5f;
  20. break;
  21. }
  22.  
  23. return _spellCd;
  24. }
  25.  
  26. void Start()
  27. {
  28. print(GetSpellCd(Spell.IceLance));
  29. print(GetSpellCd(Spell.FireSpell));
  30. }
  31.  
  32. void Update()
  33. {
  34.  
  35. }
  36. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement