void Start() { mpSlider = this.gameObject.GetComponent <Slider>(); cursor = FindObjectOfType <CursorSetting>(); mpSlider.value = maxMP; nowMP = maxMP; }
public override void Initialize(System.Action <ICoreService> onComplete) { this.DelayedCall(_tooltipUpdateDelay, UpdateOverlay, true); _currentSetting = CursorSettings[0]; onComplete(this); }
void Awake() { if(null != Instance) { GameObject.Destroy(gameObject); } else { Instance = this; DontDestroyOnLoad(gameObject); } }
public void SetCursor(CursorSetting setting, bool updateCurrentSetting = true) { if (setting != null) { if (updateCurrentSetting) { SetCurrentSetting(setting); } _isColored = false; SetCursorIcon(setting.Icon, _currentSetting.Scale); _currentCursor.ChangeDisplaySecondaryCursor(setting.DisplaySecondaryIcon); } }
private void SetCurrentSetting(CursorSetting setting) { _previousSetting = _currentSetting; _currentSetting = setting; }
public void SetCursorType(CursorType cursorType, bool updateCurrentSetting = true) { CursorSetting setting = FindSettingByType(cursorType); SetCursor(setting, updateCurrentSetting); }