コード例 #1
0
        public static StateTimelineEditorWindow OpenWindow(StateTimeline stateTimeline)
        {
            StateTimelineEditorWindow wnd = CreateWindow <StateTimelineEditorWindow>();

            wnd.titleContent  = new GUIContent("AttackTimeline");
            wnd.minSize       = new Vector2(400, 300);
            wnd.stateTimeline = stateTimeline;
            wnd.RefreshAll(true);
            return(wnd);
        }
コード例 #2
0
        public override void OnInspectorGUI()
        {
            StateTimeline st = (StateTimeline)target;

            base.OnInspectorGUI();
            if (GUILayout.Button("Open Editor"))
            {
                currentTimeline = StateTimelineEditorWindow.OpenWindow(st);
                currentTimeline.RefreshAll();
            }

            if (GUI.changed)
            {
                if (currentTimeline)
                {
                    currentTimeline.RefreshFrameBars();
                }
            }
        }
 public virtual bool TryCondition(Type id, IFighterBase fighter, IConditionVariables variables, StateTimeline timeline, int frame)
 {
     return(functions[id](fighter, variables, timeline, frame));
 }