private void ChangeSpellMode(ASpellMode nextMode) { activeSpellMode.OnSpellChangedFrom(); if (activeSpellMode != nextMode) { activeSpellMode = nextMode; } }
public void Start() { uiManager = this.gameObject.GetComponent <UIManager>(); spellSource = this.gameObject.FindObjectInChildren("SpellSource").transform; fireMode = gameObject.GetComponentInChildren <FireMode>(); windMode = gameObject.GetComponentInChildren <WindMode>(); iceMode = gameObject.GetComponentInChildren <IceMode>(); activeSpellMode = fireMode; cameraManager = Camera.main.GetComponent <CameraManager>(); lockOnManager = gameObject.GetComponent <LockOnManager>(); uiManager.UISetReadySpellIcon(); }