private void put_action_into_group( Action action, IAction_group group ) { group.add_action(action); action.action_group = group; }
public void add_next_action_group( IAction_group new_group ) { last_moment++; action_groups.Add(new_group); moments_to_action_groups.Add(last_moment, new_group); }
public Figure_appearance( IFigure in_figure, IAction_group start, IAction_group end ) { figure = in_figure; appearance_start = new Action(Action_type.Start, this, start); appearance_end = new Action(Action_type.End, this, end); }
public Action( Action_type in_type, IFigure_appearance in_appearance, IAction_group in_group ) { type = in_type; figure_appearance = in_appearance; action_group = in_group; }
public void input_signals(IEnumerable <IFigure> signals, int mood_change = 0) { float new_mood = get_last_mood() + mood_change; IAction_group action_group = create_next_action_group(new_mood); create_figure_appearances( signals, action_group, action_group ); }
private void create_figure_appearances( IEnumerable <IFigure> figures, IAction_group start, IAction_group end ) { foreach (var figure in figures) { create_figure_appearance(figure, start, end); } }
private void parce_actions_of(IAction_group group) { foreach (IAction action in group) { if (action is IAppearance_start) { add_next_subfigure(action.figure_appearance); } else if (action is IAppearance_end) { remember_finished_subfigure(action.figure_appearance); } } }
public IFigure_appearance create_figure_appearance( IFigure figure, IAction_group start, IAction_group end ) { Figure_appearance appearance = figure_appearance_prefab .get_for_figure(figure); figure.add_appearance(appearance); put_action_into_group(appearance.appearance_start, start); put_action_into_group(appearance.appearance_end, end); appearance.create_curved_line(); return(appearance); }
private IFigure_appearance create_simple_figure_appearance( IFigure figure, IAction_group start, IAction_group end ) { IFigure_appearance appearance = new Figure_appearance( figure, start, end ); figure.add_appearance(appearance); start.add_action(appearance.get_start()); end.add_action(appearance.get_end()); return(appearance); }
IFigure_appearance IAction_history.create_figure_appearance( IFigure figure, IAction_group start, IAction_group end ) => create_figure_appearance(figure, start, end);