本文整理汇总了C#中eDriven.Core.Events.Event类的典型用法代码示例。如果您正苦于以下问题:C# Event类的具体用法?C# Event怎么用?C# Event使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Event类属于eDriven.Core.Events命名空间,在下文中一共展示了Event类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ChangeButtonColor
public void ChangeButtonColor(Event e)
{
// GUI lookup example
Button button = GuiLookup.FindComponent<Button>(gameObject, "button1");
if (null != button)
button.Color = Color.green;
}
示例2: RemoveButtonColor
public void RemoveButtonColor(Event e)
{
// GUI lookup example
Button button = GuiLookup.GetComponent("button1") as Button;
if (null != button)
button.Color = Color.white;
}
示例3: RollOverHandler
private void RollOverHandler(Event e)
{
if (e.Target != this) // skin
return;
/*_tween = new Sequence(
Tween.New().SetOptions(
new TweenOption(TweenOptionType.Property, "Height"),
new TweenOption(TweenOptionType.Duration, 1f),
new TweenOption(TweenOptionType.Easer, (Tween.EasingFunction)Expo.EaseInOut),
new TweenOption(TweenOptionType.StartValueReader, new PropertyReader("Height")),
new TweenOption(TweenOptionType.EndValue, 400f),
new TweenOption(TweenOptionType.Target, this)
),
Tween.New().SetOptions(
new TweenOption(TweenOptionType.Property, "Width"),
new TweenOption(TweenOptionType.Duration, 1f),
new TweenOption(TweenOptionType.Easer, (Tween.EasingFunction)Expo.EaseInOut),
new TweenOption(TweenOptionType.StartValueReader, new PropertyReader("Width")),
new TweenOption(TweenOptionType.EndValue, 300f),
new TweenOption(TweenOptionType.Target, this)
)
);
_tween.Play();*/
}
示例4: MoveAreaMouseDownHandler
private void MoveAreaMouseDownHandler(Event e)
{
//Debug.Log("Mouse down: " + e.Target);
//if (e.Target != MoveArea)
// return;
//Debug.Log("MoveAreaMouseDownHandler: " + e.Target);
// Only allow dragging of pop-upped windows
if (Enabled && IsPopUp)
{
e.CancelAndStopPropagation();
// Calculate the mouse's offset in the window
//offsetX = event.stageX - x;
//offsetY = event.stageY - y;
BringToFront();
MouseEvent me = (MouseEvent) e;
_offset = me.GlobalPosition.Subtract(Transform.Position);
var sm = SystemEventDispatcher.Instance;
sm.AddEventListener(MouseEvent.MOUSE_MOVE, MoveAreaMouseMoveHandler, EventPhase.CaptureAndTarget);
sm.AddEventListener(MouseEvent.MOUSE_UP, MoveAreaMouseUpHandler, EventPhase.CaptureAndTarget);
_cursorId = CursorManager.Instance.SetCursor(CursorType.Move);
}
}
示例5: PaintButtonGreen
public void PaintButtonGreen(Event e)
{
// GUI lookup example
Button button = GuiLookup.GetComponent("button1") as Button;
if (null != button)
button.Color = Color.green;
}
示例6: TimerHandler
private void TimerHandler(Event e)
{
Callback(Lines[_count]);
_count++;
if (_count >= Lines.Length)
_count = 0;
}
示例7: ClosingHandler
public void ClosingHandler(Event e)
{
Alert.Show("Combo box closing", string.Format(@"[{0}] received:
Type: {1}
Target: {2}
CurrentTarget: {3}", e.GetType(), e.Type, e.Target, e.CurrentTarget), AlertButtonFlag.Ok);
}
示例8: OnPauseChanged
private void OnPauseChanged(Event e)
{
bool paused = (bool)((ValueEvent) e).Value;
Debug.Log("OnPauseChanged. Paused: " + paused);
if (paused)
_timer.Stop();
else
_timer.Start();
}
示例9: ClickHandler
public void ClickHandler(Event e)
{
//Debug.Log("ClickHandler: " + e.Target);
Alert.Show("Event", string.Format(@"[{0}] received:
Type: {1}
Target: {2}
CurrentTarget: {3}", e.GetType(), e.Type, e.Target, e.CurrentTarget), AlertButtonFlag.Ok);
}
示例10: RemoveDialog
public void RemoveDialog(Event e)
{
Button button = e.Target as Button;
if (button != null)
{
Dialog dialog = GuiLookup.FindParent<Dialog>(button);
PopupManager.Instance.RemovePopup(dialog);
}
}
示例11: Info
public void Info(Event e)
{
Alert.Show(
"Info",
"This is the info message. The time is: " + DateTime.Now.ToLongTimeString(),
AlertButtonFlag.Ok,
new AlertOption(AlertOptionType.HeaderIcon, Resources.Load("Icons/information")),
new AlertOption(AlertOptionType.AddedEffect, _alertEffect)
);
}
示例12: OnReset
private static void OnReset(Event e)
{
Debug.Log("OnReset");
GameObject[] gameObjects = GameObject.FindGameObjectsWithTag("Cube");
// destroy all Cubes
foreach (GameObject o in gameObjects)
{
Destroy(o);
}
}
示例13: IdleRollOverHandler
private void IdleRollOverHandler(Event e)
{
if (e.Target != _component)
return;
#if DEBUG
if (DebugMode)
{
Debug.Log("IdleRollOverHandler");
}
#endif
SystemManager.Instance.MouseMoveSignal.Connect(MouseMoveSlot);
//SystemManager.Instance.MouseUpSignal.Connect(MouseUpSlot);
}
示例14: ClickHandler
public void ClickHandler(Event e)
{
//Debug.Log("ClickHandler: " + e.Target);
Alert.Show("Event",
string.Format(@"[{0}] received:
Type: {1}
Target: {2}
CurrentTarget: {3}", e.GetType(), e.Type,
e.Target, e.CurrentTarget), AlertButtonFlag.Ok,
new AlertOption(AlertOptionType.HeaderIcon, Resources.Load("Icons/information")),
new AlertOption(AlertOptionType.AddedEffect, _alertEffect)
);
}
示例15: KeyUpHandler
private void KeyUpHandler(Event e)
{
KeyboardEvent ke = (KeyboardEvent)e;
//Debug.Log("KeyUpHandler: " + ke.KeyCode);
if (KeyCode.Escape == ke.KeyCode)
{
//Debug.Log("DialogCloseOnEsc->Escape");
e.CancelAndStopPropagation();
//PopupManager.Instance.RemovePopup(_dialog);
if (Enabled)
_dialog.ExecCallback("cancel");
}
}