CodeScrollItem.Drag C# (CSharp) Метод

Drag() защищенный Метод

protected Drag ( ) : void
Результат void
    protected override void Drag()
    {
        // make "uncastable" (uncompilable) spells not draggable
        if (!compilable) {
            time_started = Time.time;
            return;
        }
        if (!on_drag) {
            time_started = Time.time;
            on_drag = true;
        }
        base.Drag();

        GameObject obj = objectUnderCursor();
        if(obj != null){
            if(obj.GetComponent<Enchantable>() != null) {
                Highlighter.highlight(obj, Color.green);
            } else {
                Highlighter.highlight(obj, Color.red);
            }
        } else {
            Highlighter.highlight(null, Color.black);
        }
    }