コード例 #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;
        }
コード例 #2
0
        private void hideOutline(ref CharacterOutline outline)
        {
            if (outline == null)
            {
                return;
            }

            outline.PopColor(this);
        }
コード例 #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);
        }