示例#1
0
        public void Bind(IAtomPlugin plugin, string defaultScreen = null)
        {
            _plugin = plugin;

            _leftPanelPrefabFactory        = leftPanel.AddComponent <VamPrefabFactory>();
            _leftPanelPrefabFactory.plugin = plugin;

            _controlPanel = CreateControlPanel(leftPanel);
            _controlPanel.Bind(plugin);

            InitClipboardUI();

            InitChangeCurveTypeUI();

            _curves = InitCurvesUI();

            tabs.Add(AnimationsScreen.ScreenName);
            tabs.Add(TargetsScreen.ScreenName);
            tabs.Add(EditAnimationScreen.ScreenName);
            tabs.Add(MoreScreen.ScreenName);
            _expandButton = tabs.Add("Collapse >");
            InitToggleRightPanelButton(_expandButton);
            tabs.onTabSelected.AddListener(screenName =>
            {
                screensManager.ChangeScreen(screenName);
                Expand(true);
            });

            screensManager = InitScreensManager(rightPanel);
            screensManager.onScreenChanged.AddListener(screenName => tabs.Select(screenName));
            screensManager.Bind(plugin, defaultScreen);
        }
示例#2
0
        private void InitControlPanelUI(bool rightSide)
        {
            var controlPanelContainer = _plugin.CreateSpacer(rightSide);

            controlPanelContainer.height = 500f;
            _controlPanel = controlPanelContainer.gameObject.AddComponent <AnimationControlPanel>();
            _controlPanel.Bind(_plugin);
        }
示例#3
0
        public void Bind(AtomAnimation animation)
        {
            this.animation = animation;

            _controlPanel.Bind(animation);
            _curveType.Bind(animation);
            _curves.Bind(animation);
        }
示例#4
0
        public void Bind(AtomAnimationEditContext ctx)
        {
            animationEditContext = ctx;

            _controlPanel.Bind(ctx);
            _curveType.Bind(ctx);
            _curves.Bind(ctx);
        }
示例#5
0
 public void VamTimelineRequestControlPanelInjection(GameObject container)
 {
     _controllerInjectedControlerPanel = container.GetComponent <AnimationControlPanel>();
     if (_controllerInjectedControlerPanel == null)
     {
         _controllerInjectedControlerPanel = container.AddComponent <AnimationControlPanel>();
         _controllerInjectedControlerPanel.Bind(this);
     }
     _controllerInjectedControlerPanel.Bind(animation);
 }
示例#6
0
 public void Bind(AtomAnimation animation)
 {
     _controlPanel.Bind(animation);
     ChangeScreen(GetDefaultScreen());
 }