Esempio n. 1
0
    public void OnInputClicked(InputClickedEventData eventData)
    {
        PolymerSelectMode selectMode  = CoreAPI.PostCommand <MainConsoleModule, GetSelectModeCommand, PolymerSelectMode>(new GetSelectModeCommand());
        DisplayMode       displayMode = CoreAPI.PostCommand <MainConsoleModule, GetDisplayModeCommand, DisplayMode>(new GetDisplayModeCommand());

        //只有棍模型下的棍支持选取
        if (displayMode != DisplayMode.Sticks)
        {
            return;
        }
        AminoacidDisplayer aminoacidDisplayer = transform.parent.GetComponent <AminoacidDisplayer>();

        aminoacidDisplayer.OnInputClicked(eventData);
    }
Esempio n. 2
0
    public void OnInputClicked(InputClickedEventData eventData)
    {
        PolymerSelectMode  selectMode         = CoreAPI.PostCommand <MainConsoleModule, GetSelectModeCommand, PolymerSelectMode>(new GetSelectModeCommand());
        AminoacidDisplayer aminoacidDisplayer = transform.parent.GetComponent <AminoacidDisplayer>();

        if (selectMode == PolymerSelectMode.Atom)
        {
            CoreAPI.SendCommand <ProteinDisplayModule, SetSelectedDisplayerCommand>(new SetSelectedDisplayerCommand(this));
        }
        else
        {
            aminoacidDisplayer.OnInputClicked(eventData);
        }
    }