本文整理汇总了C#中EventObject类的典型用法代码示例。如果您正苦于以下问题:C# EventObject类的具体用法?C# EventObject怎么用?C# EventObject使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
EventObject类属于命名空间,在下文中一共展示了EventObject类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: CreateRoom
public void CreateRoom(EventObject evt = null)
{
if(NetworkManager.singleton.matches == null || NetworkManager.singleton.matches.Count == 0) {
NetworkManager.singleton.matchMaker.CreateMatch("default", NetworkManager.singleton.matchSize, true, "", NetworkManager.singleton.OnMatchCreate);
SetInfoText("Creating game...");
}
}
示例2: Reset
public virtual void Reset(EventObject evt = null)
{
currentHits = 0;
hasChanged = false;
currentModelRoot.SetActive(true);
destroyedModel.SetActive(false);
}
示例3: RegisterListener
public void RegisterListener( EEventType eventType, ListenerDelegate delg )
{
EventObject obj = new EventObject();
obj.MyEvent = eventType;
obj.ThisDelegate = delg;
listenerObjects.Add( obj );
}
示例4: EventObjectAll
public EventObjectAll(EventObject object1, EventObject object2, EventObject object3, EventObject object4, EventObject object5)
{
Object1 = object1;
Object2 = object2;
Object3 = object3;
Object4 = object4;
Object5 = object5;
}
示例5: Save
public void Save(EventObject eventObject)
{
var session = SessionManager.OpenSessionIfRequired(this.sessionFactory);
using (var transaction = session.BeginTransaction())
{
session.Save(eventObject);
session.Transaction.Commit();
}
}
示例6: RecycleAllItems
/// <summary>
/// Recycles ALL spawned pooled items.
/// </summary>
/// <param name="evt">Evt.</param>
public void RecycleAllItems(EventObject evt = null)
{
List<GameObject> tempList = new List<GameObject>();
tempList.AddRange(instance.spawnedItems.Keys);
for(int i = 0; i < tempList.Count; i++) {
RecycleToPool(tempList[i]);
}
tempList.Clear();
}
示例7: RemoveListenerFromCache
private static void RemoveListenerFromCache(object aListener, EventObject aEvent)
{
if (_listenerDict.ContainsKey(aListener))
{
if (_listenerDict[aListener].Contains(aEvent))
{
_listenerDict[aListener].Remove(aEvent);
}
}
}
示例8: fireDisposingEvent
void fireDisposingEvent(EventObject Source)
{
if (Disposing != null)
{
try
{
Disposing.Invoke(this, new EventObjectForwarder(Source));
}
catch { }
}
}
开发者ID:TUD-INF-IAI-MCI,项目名称:Tangram_Lector_Workstation,代码行数:11,代码来源:AbstractXEventListener_Forwarder.cs
示例9: AddListenerToCache
private static void AddListenerToCache(object aListener, EventObject aEvent)
{
if (!_listenerDict.ContainsKey(aListener))
{
_listenerDict.Add(aListener, new List<EventObject>());
}
if (!_listenerDict[aListener].Contains(aEvent))
{
_listenerDict[aListener].Add(aEvent);
}
}
示例10: Disconnect
public void Disconnect(EventObject evt)
{
if(isHost) {
NetworkManager.singleton.StopHost();
isHost = false;
} else {
if(NetworkManager.singleton.IsClientConnected()) {
NetworkManager.singleton.client.Disconnect();
//SceneManager.LoadScene(0);
Application.LoadLevel (0);
}
}
}
示例11: ForwardedEventArgs
void XEventListener.disposing(EventObject Source)
{
if (Disposing != null)
{
try
{
Disposing.Invoke(this, new ForwardedEventArgs(Source));
}
catch (Exception e)
{
Logger.Instance.Log(LogPriority.ALWAYS, this, "[ERROR] Could not forward disposing event: " + e);
}
}
}
示例12: BroadcastEvent
public static void BroadcastEvent(string eventName, EventObject eventObj)
{
if(_events.ContainsKey(eventName))
{
List<EventManagerCallback> callbackList = _events[eventName];
foreach(EventManagerCallback callback in callbackList)
{
if(callback != null)
{
Debug.Log("** BROADCAST EVENT " + eventName);
callback(eventObj);
}
}
}
}
示例13: HandleInputFieldChange
private void HandleInputFieldChange(EventObject evt)
{
if(evt.Params[0] != null) {
InputFieldVO data = (InputFieldVO)evt.Params[0];
if(data.inputKey == InputFieldKeys.MenuNameInput) {
localPlayerName = data.inputValue;
}
else if(data.inputKey == InputFieldKeys.MenuTeamSelectInput) {
if(data.inputValue == "Heroes") {
localPlayerTeam = Settings.HeroTeam;
} else {
localPlayerTeam = Settings.VillainTeam;
}
}
}
}
示例14: RemoveEventHandler
/// <summary>
/// Removes the specified event handler
/// </summary>
public static void RemoveEventHandler(IEventHandler handler, EventType mask, HandlingPriority priority)
{
try
{
EventObject eo = new EventObject(handler, mask, priority);
switch (priority)
{
case HandlingPriority.High:
highObjects.Remove(eo);
break;
case HandlingPriority.Normal:
normalObjects.Remove(eo);
break;
case HandlingPriority.Low:
lowObjects.Remove(eo);
break;
}
}
catch (Exception ex)
{
ErrorManager.ShowError(ex);
}
}
示例15: headertriggerclick
/// <summary>
/// Parameters<li><span>ct</span> : <see cref="Ext.grid.header.Container">Ext.grid.header.Container</see><div><p>The grid's header Container which encapsulates all column headers.</p>
/// </div></li><li><span>column</span> : <see cref="Ext.grid.column.Column">Ext.grid.column.Column</see><div><p>The Column header Component which provides the column definition</p>
/// </div></li><li><span>e</span> : <see cref="Ext.EventObject">Ext.EventObject</see><div>
/// </div></li><li><span>t</span> : HTMLElement<div>
/// </div></li><li><span>eOpts</span> : <see cref="Object">Object</see><div><p>The options object passed to <see>Ext.util.Observable.addListener</see>.</p>
/// </div></li>
/// </summary>
/// <param name="ct"><p>The grid's header Container which encapsulates all column headers.</p>
/// </param>
/// <param name="column"><p>The Column header Component which provides the column definition</p>
/// </param>
/// <param name="e">
/// </param>
/// <param name="t">
/// </param>
/// <param name="eOpts"><p>The options object passed to <see cref="Ext.util.Observable.addListener">Ext.util.Observable.addListener</see>.</p>
/// </param>
public void headertriggerclick(Ext.grid.header.Container ct, Ext.grid.column.Column column, EventObject e, object t, object eOpts){}