Пример #1
0
    bool OnTrigger()
    {
        if (hoverActor != null && GetInvalidActorReason(hoverActor) == null)
        {
            bool addedOrPresent = editMain.AddSetOrRemoveTargetActor(hoverActor);

            if (editMain.GetTargetActorsCount() == 1)
            {
                logicSidebar.OpenWithParams(editMain.GetFocusedTargetActor());
                UpdateSelectionEffectVisibility(true);
            }
            return(true);
        }
        else
        {
            /*  if (!Util.HoldingModiferKeys())
             * {
             * editMain.ClearTargetActors();
             *
             * } */
            return(false);
        }
    }
Пример #2
0
    public override void Launch(EditMain _editmain)
    {
        base.Launch(_editmain);

        logicSidebar    = editMain.GetLogicSidebar();
        selectionEffect = Instantiate(inspectorEffectPrefab, transform).transform;
        selectionEffect.GetComponent <ToolRingFXColor>().SetTint(editMain.GetAvatarTint());

        selectionEffect.gameObject.SetActive(false);

        logicSidebar.OnSwitchToCodeView = OnSwitchToCodeView;
        logicSidebar.OnSwitchToCardView = OnSwitchToCardView;

        logicSidebar.onOpenActor = OnOpenActor;

        if (toolMemory.logicTabIndex == 0)
        {
            logicSidebar.SetToCardView();
        }
        else
        {
            logicSidebar.SetToCodeView();
        }

        if (editMain.GetSingleTargetActor() != null)
        {
            if (!(editMain.GetSingleTargetActor() == toolMemory.logicActor && toolMemory.logicSidebarClosed))
            {
                ForceUpdateTargetActor();
            }
        }
        else
        {
            logicSidebar.OpenWithParams(null);
        }
    }