Exemplo 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;
        }
Exemplo n.º 2
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);
        }