/// <summary> /// Starts the buff and timer. /// </summary> public void Launch() { if (_isRunning) { return; } if (Outline) { if (_outline == null) { _outline = GetComponent <CharacterOutline>(); if (_outline == null) { _outline = gameObject.AddComponent <CharacterOutline>(); _outline.DisplayDefault = false; } } _outline.PushColor(this, OutlineColor); } Begin(); _timer = Duration; _isRunning = true; enabled = true; }
private void showOutline(ref CharacterOutline outline, Actor target, Color color) { if (outline != null) { hideOutline(ref outline); } outline = target.GetComponent <CharacterOutline>(); if (outline == null) { outline = target.gameObject.AddComponent <CharacterOutline>(); outline.DisplayDefault = false; } outline.PushColor(this, color); }