Esempio n. 1
0
        /// <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;
        }
Esempio n. 2
0
        private void hideOutline(ref CharacterOutline outline)
        {
            if (outline == null)
            {
                return;
            }

            outline.PopColor(this);
        }
Esempio n. 3
0
        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);
        }