internal void AddAction_5(double id, string content) { Action5 action5 = new Action5(); action5.ID = id; action5.Content = content; _actions_5.Add(action5); }
public ConsoleMethod_Action5(Action5 method, MethodDescription description) : base(description) { if (method == null) { throw new ArgumentNullException(nameof(method)); } this.method = method; }
public IAction CreateAction(ACTION_ID id) { IAction Action = null; switch (id) { case ACTION_ID.ACTION_1: Action = new Action1(); break; case ACTION_ID.ACTION_2: Action = new Action2(); break; case ACTION_ID.ACTION_3: Action = new Action3(); break; case ACTION_ID.ACTION_4: Action = new Action4(); break; case ACTION_ID.ACTION_5: Action = new Action5(); break; case ACTION_ID.ACTION_6: Action = new Action6(); break; case ACTION_ID.ACTION_DasheBackward: Action = new ActionDashBackward(); break; case ACTION_ID.ACTION_DasheForward: Action = new ActionDashForward(); break; case ACTION_ID.ACTION_Jab: Action = new ActionJab(); break; case ACTION_ID.ACTION_Kick: Action = new ActionKick(); break; case ACTION_ID.ACTION_MoveAttack1: Action = new ActionMoveAttack1(); break; case ACTION_ID.ACTION_MoveAttack2: Action = new ActionMoveAttack2(); break; case ACTION_ID.ACTION_Punch: Action = new ActionPunch(); break; case ACTION_ID.ACTION_RangeAttack1: Action = new ActionRangeAttack1(); break; case ACTION_ID.ACTION_RangeAttack2: Action = new ActionRangeAttack2(); break; case ACTION_ID.ACTION_SpecialAttack1: Action = new ActionSpecialAttack1(); break; case ACTION_ID.ACTION_SpecialAttack2: Action = new ActionSpecialAttack2(); break; case ACTION_ID.ACTION_Uppercut: Action = new ActionUppercut(); break; default: Action = new NullAction(); break; } ControllerCenter.Instance.ActionSystem.Add((uint)(Time.realtimeSinceStartup) * 100, Action); return(Action); }
protected Area(SerializationInfo info, StreamingContext context) { serializationOptions = (WidgetSerialization)info.GetValue("SerializeOptions", typeof(WidgetSerialization)); zOrder = info.GetUInt32("ZOrder"); parent = (IWidget)info.GetValue("Parent", typeof(IWidget)); description = info.GetString("Description"); containedDescriptionShowUpTime = info.GetSingle("ContainedDescriptionShowUpTime"); containedDescriptionPositioning = (LayoutAnchor)info.GetValue("ContainedDescriptionPositioning", typeof(LayoutAnchor)); containedDescriptionObject = (IDisplayObject)info.GetValue("ContainedDescriptionObject", typeof(IDisplayObject)); anchor = (LayoutAnchor)info.GetValue("Anchor", typeof(LayoutAnchor)); minSize = (GuiVector2)info.GetValue("MinSize", typeof(GuiVector2)); maxSize = (GuiVector2)info.GetValue("MaxSize", typeof(GuiVector2)); preferredSize = (GuiVector2)info.GetValue("PreferredSize", typeof(GuiVector2)); preserveRatio = info.GetBoolean("PreserveRatio"); preferredRect = (GuiRect)info.GetValue("PreferredRect", typeof(GuiRect)); marginLeft = (GuiScalar)info.GetValue("MarginLeft", typeof(GuiScalar)); marginRight = (GuiScalar)info.GetValue("MarginRight", typeof(GuiScalar)); marginTop = (GuiScalar)info.GetValue("MarginTop", typeof(GuiScalar)); marginBottom = (GuiScalar)info.GetValue("MarginBottom", typeof(GuiScalar)); if ((serializationOptions & WidgetSerialization.PersistAllStyles) > 0) { style = (Style)info.GetValue("Style", typeof(Style)); } else if ((serializationOptions & WidgetSerialization.PersistNonThemeStyles) > 0) { style = (Style)info.GetValue("Style", typeof(Style)); } if ((serializationOptions & WidgetSerialization.PersistRenderer) > 0) { renderer = (Themes.IGuiRenderer)info.GetValue("Renderer", typeof(Themes.IGuiRenderer)); } if ((serializationOptions & WidgetSerialization.PersistState) > 0) { isVisible = info.GetBoolean("IsVisible"); } if ((serializationOptions & WidgetSerialization.PersistAnimations) > 0) { animationState = (StyleAnimationController)info.GetValue("StyleAnimationController", typeof(StyleAnimationController)); activeAnimations = (List <AnimationProcess>)info.GetValue("ActiveAnimations", typeof(List <AnimationProcess>)); } if ((serializationOptions & WidgetSerialization.PersistEventBindings) > 0) { onChange = (Action <IPreChangeNotifier>)info.GetValue("OnChange", typeof(Action <IPreChangeNotifier>)); onMouseOver = (Action2 <Area, IPointer>)info.GetValue("OnMouseOver", typeof(Action2 <Area, IPointer>)); onMouseLeave = (Action2 <Area, IPointer>)info.GetValue("OnMouseLeave", typeof(Action2 <Area, IPointer>)); onMousePressed = (Action4 <Area, IPointer, uint, InputEventModifier>)info.GetValue("OnMousePressed", typeof(Action4 <Area, IPointer, uint, InputEventModifier>)); onMouseReleased = (Action3 <Area, IPointer, uint>)info.GetValue("OnMouseReleased", typeof(Action3 <Area, IPointer, uint>)); onWheel = (Action3 <Area, IPointer, float>)info.GetValue("OnWheel", typeof(Action3 <Area, IPointer, float>)); onMouseMove = (Action3 <Area, IPointer, Vector2f>)info.GetValue("OnMouseMove", typeof(Action3 <Area, IPointer, Vector2f>)); onFocusGain = (Action <Area>)info.GetValue("OnFocusGain", typeof(Action <Area>)); onFocusLost = (Action <Area>)info.GetValue("OnFocusLost", typeof(Action <Area>)); onKeyPressed = (Action5 <Area, IPointer, KeyCodes, KeyboardModifiers, InputEventModifier>)info.GetValue( "OnKeyPressed", typeof(Action5 <Area, IPointer, KeyCodes, KeyboardModifiers, InputEventModifier>)); onKeyReleased = (Action4 <Area, IPointer, KeyCodes, KeyboardModifiers>)info.GetValue("OnKeyReleased", typeof(Action4 <Area, IPointer, KeyCodes, KeyboardModifiers>)); onDescriptionShow = (Action2 <Area, IWidget>)info.GetValue("OnDescriptionShow", typeof(Action2 <Area, IWidget>)); onDescriptionHide = (Action2 <Area, IWidget>)info.GetValue("OnDescriptionHide", typeof(Action2 <Area, IWidget>)); onStyleStateChange = (Action3 <Area, StyleState, StyleState>)info.GetValue("OnStyleStateChange", typeof(Action3 <Area, StyleState, StyleState>)); } }
void IUserInteractive.OnKeyPress(IPointer cursor, KeyCodes code, KeyboardModifiers modifiers, InputEventModifier eventModifiers) { OnKeyPressInternal(cursor, code, modifiers, eventModifiers); Action5 <Area, IPointer, KeyCodes, KeyboardModifiers, InputEventModifier> t = onKeyPressed; if (t != null) { t(this, cursor, code, modifiers, eventModifiers); } }
/// <summary> /// 创建一个新的控制台方法; /// </summary> public static Method Create(Action5 method, MethodDescription description) { return(new ConsoleMethod_Action5(method, description)); }