예제 #1
0
 public virtual void Reset(EventObject evt = null)
 {
     currentHits = 0;
     hasChanged = false;
     currentModelRoot.SetActive(true);
     destroyedModel.SetActive(false);
 }
 public void RegisterListener( EEventType eventType, ListenerDelegate delg )
 {
     EventObject obj = new EventObject();
     obj.MyEvent = eventType;
     obj.ThisDelegate = delg;
     listenerObjects.Add( obj );
 }
 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...");
     }
 }
예제 #4
0
파일: Nearby.cs 프로젝트: m3hrad/CityCrowd
 public EventObjectAll(EventObject object1, EventObject object2, EventObject object3, EventObject object4, EventObject object5)
 {
     Object1 = object1;
     Object2 = object2;
     Object3 = object3;
     Object4 = object4;
     Object5 = object5;
 }
예제 #5
0
 /// <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();
 }
예제 #6
0
 public void Save(EventObject eventObject)
 {
     var session = SessionManager.OpenSessionIfRequired(this.sessionFactory);
     using (var transaction = session.BeginTransaction())
     {
         session.Save(eventObject);
         session.Transaction.Commit();
     }
 }
 private static void RemoveListenerFromCache(object aListener, EventObject aEvent)
 {
     if (_listenerDict.ContainsKey(aListener))
     {
         if (_listenerDict[aListener].Contains(aEvent))
         {
             _listenerDict[aListener].Remove(aEvent);
         }
     }
 }
 void fireDisposingEvent(EventObject Source)
 {
     if (Disposing != null)
     {
         try
         {
             Disposing.Invoke(this, new EventObjectForwarder(Source));
         }
         catch { }
     }
 }
        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);
            }
        }
 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);
         }
     }
 }
 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
0
 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);
             }
         }
     }
 }
        void XSelectionChangeListener.selectionChanged(EventObject aEvent)
        {

           // Logger.Instance.Log(LogPriority.DEBUG, this, "[SELECTION INFO] Selection changed in forwarder");

            if (SelectionChanged != null)
            {
                try
                {
                    SelectionChanged.Invoke(this, new ForwardedEventArgs(aEvent));
                }
                catch (Exception e)
                {
                    Logger.Instance.Log(LogPriority.ALWAYS, this, "[ERROR] Could not forward selection event: " + e);
                }
            }
        }
    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;
                }
            }
        }
    }
예제 #15
0
 /// <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);
     }
 }
예제 #16
0
	private void HandleSentScore(EventObject evt) {
		if(evt.Params != null) {
			currentScore = (int)evt.Params[0];
		}
		SetScoreValues();
	}
예제 #17
0
 /// <summary>
 /// Respond to a date being clicked in the picker
 /// </summary>
 /// <param name="e">
 /// </param>
 /// <param name="t">
 /// </param>
 private void handleDateClick(EventObject e, object t){}
예제 #18
0
 private void GetSteps(EventObject evt)
 {
     gameObject.DispatchGlobalEvent(GameEvent.SendLastScore, new object[] { steps });
 }
예제 #19
0
 /// <summary>
 /// Parameters<li><span>view</span> : <see cref="Ext.view.Table">Ext.view.Table</see><div>
 /// </div></li><li><span>node</span> : HTMLElement<div>
 /// </div></li><li><span>group</span> : <see cref="String">String</see><div><p>The name of the group</p>
 /// </div></li><li><span>e</span> : <see cref="Ext.EventObject">Ext.EventObject</see><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="view">
 /// </param>
 /// <param name="node">
 /// </param>
 /// <param name="group"><p>The name of the group</p>
 /// </param>
 /// <param name="e">
 /// </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 groupdblclick(Ext.view.Table view, object node, JsString group, EventObject e, object eOpts)
 {
 }
 /// <summary>
 /// Fires on a specified interval during the time the element is pressed.
 /// </summary>
 /// <param name="this">
 /// </param>
 /// <param name="e">
 /// </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 click(ClickRepeater @this, EventObject e, object eOpts)
 {
 }
예제 #21
0
        public void processEvent(EventObject eventObject)
        {
            //System.Diagnostics.Debug.WriteLine(string.Format("Boss AI Event Listener, EventType={0}", (EventTypes)eventObject.getEventType()));

            List <BossAIItem> bossAIItemList        = null;
            Monster           monster               = null;
            GameClient        gameClient            = null;
            List <BossAIItem> allDeadBossAIItemList = null;

            List <BossAIItem> execBossAIItemList = new List <BossAIItem>();

            if (eventObject.getEventType() == (int)EventTypes.MonsterBirthOn)
            {
                monster = (eventObject as MonsterBirthOnEventObject).getMonster();
#if ___CC___FUCK___YOU___BB___
                int AIID = 0;
#else
                int AIID = monster.MonsterInfo.AIID;
#endif

                if (AIID > 0)
                {
                    bossAIItemList = BossAICachingMgr.FindCachingItem(AIID, (int)BossAITriggerTypes.BirthOn);
                    if (null != bossAIItemList)
                    {
                        lock (monster.TriggerMutex)
                        {
                            for (int i = 0; i < bossAIItemList.Count; i++)
                            {
                                if (!monster.CanExecBossAI(bossAIItemList[i]))
                                {
                                    continue; //如果不能执行,则跳过
                                }


                                monster.RecBossAI(bossAIItemList[i]);
                                execBossAIItemList.Add(bossAIItemList[i]);
                            }
                        }
                    }
                }
            }
            else if (eventObject.getEventType() == (int)EventTypes.MonsterDead)
            {
                monster    = (eventObject as MonsterDeadEventObject).getMonster();
                gameClient = (eventObject as MonsterDeadEventObject).getAttacker();

#if ___CC___FUCK___YOU___BB___
                int AIID = 0;
#else
                int AIID = monster.MonsterInfo.AIID;
#endif

                if (AIID > 0)
                {
                    bossAIItemList = BossAICachingMgr.FindCachingItem(AIID, (int)BossAITriggerTypes.Dead);

                    if (null != bossAIItemList)
                    {
                        lock (monster.TriggerMutex)
                        {
                            for (int i = 0; i < bossAIItemList.Count; i++)
                            {
                                if (!monster.CanExecBossAI(bossAIItemList[i]))
                                {
                                    continue; //如果不能执行
                                }

                                monster.RecBossAI(bossAIItemList[i]);
                                execBossAIItemList.Add(bossAIItemList[i]);
                            }
                        }
                    }

                    allDeadBossAIItemList = BossAICachingMgr.FindCachingItem(AIID, (int)BossAITriggerTypes.DeadAll);
                    if (null != allDeadBossAIItemList)
                    {
                        for (int i = 0; i < allDeadBossAIItemList.Count; i++)
                        {
                            if (!monster.CanExecBossAI(allDeadBossAIItemList[i]))
                            {
                                continue; //如果不能执行
                            }

                            bool       toContinue    = false;
                            List <int> monsterIDList = (allDeadBossAIItemList[i].Condition as AllDeadCondition).MonsterIDList;
                            for (int j = 0; j < monsterIDList.Count; j++)
                            {
                                List <object> findMonsters = GameManager.MonsterMgr.FindMonsterByExtensionID(monster.CurrentCopyMapID, monsterIDList[j]);
                                if (findMonsters.Count > 0)
                                {
                                    toContinue = true;
                                    break;
                                }
                            }

                            if (toContinue)
                            {
                                continue;
                            }

                            monster.RecBossAI(allDeadBossAIItemList[i]);
                            execBossAIItemList.Add(allDeadBossAIItemList[i]);
                        }
                    }
                }
            }
            else if (eventObject.getEventType() == (int)EventTypes.MonsterInjured)
            {
                monster    = (eventObject as MonsterInjuredEventObject).getMonster();
                gameClient = (eventObject as MonsterInjuredEventObject).getAttacker();

#if ___CC___FUCK___YOU___BB___
                int AIID = 0;
#else
                int AIID = monster.MonsterInfo.AIID;
#endif

                if (AIID > 0)
                {
                    bossAIItemList = BossAICachingMgr.FindCachingItem(AIID, (int)BossAITriggerTypes.Injured);

                    if (null != bossAIItemList)
                    {
                        lock (monster.TriggerMutex)
                        {
                            for (int i = 0; i < bossAIItemList.Count; i++)
                            {
                                if (!monster.CanExecBossAI(bossAIItemList[i]))
                                {
                                    continue; //如果不能执行
                                }

                                monster.RecBossAI(bossAIItemList[i]);
                                execBossAIItemList.Add(bossAIItemList[i]);
                            }
                        }
                    }
                }
            }
            else if (eventObject.getEventType() == (int)EventTypes.MonsterAttacked)
            {
                monster = (eventObject as MonsterAttackedEventObject).getMonster();

#if ___CC___FUCK___YOU___BB___
                int AIID = 0;
#else
                int AIID = monster.MonsterInfo.AIID;
#endif

                if (AIID > 0)
                {
                    bossAIItemList = BossAICachingMgr.FindCachingItem(AIID, (int)BossAITriggerTypes.Attacked);

                    if (null != bossAIItemList)
                    {
                        lock (monster.TriggerMutex)
                        {
                            for (int i = 0; i < bossAIItemList.Count; i++)
                            {
                                if (!monster.CanExecBossAI(bossAIItemList[i]))
                                {
                                    continue; //如果不能执行
                                }

                                monster.RecBossAI(bossAIItemList[i]);
                                execBossAIItemList.Add(bossAIItemList[i]);
                            }
                        }
                    }
                }
            }
            else if (eventObject.getEventType() == (int)EventTypes.MonsterBlooadChanged)
            {
                monster = (eventObject as MonsterBlooadChangedEventObject).getMonster();
#if ___CC___FUCK___YOU___BB___
                int AIID = 0;
#else
                int AIID = monster.MonsterInfo.AIID;
#endif

                if (AIID > 0)
                {
                    bossAIItemList = BossAICachingMgr.FindCachingItem(AIID, (int)BossAITriggerTypes.BloodChanged);

                    if (null != bossAIItemList)
                    {
                        lock (monster.TriggerMutex)
                        {
                            for (int i = 0; i < bossAIItemList.Count; i++)
                            {
                                if (!monster.CanExecBossAI(bossAIItemList[i]))
                                {
                                    continue; //如果不能执行
                                }
#if ___CC___FUCK___YOU___BB___
                                double currentLifeVPercent = monster.VLife / monster.XMonsterInfo.MaxHP;
#else
                                double currentLifeVPercent = monster.VLife / monster.MonsterInfo.VLifeMax;
#endif

                                bool canExecActions = (currentLifeVPercent >= (bossAIItemList[i].Condition as BloodChangedCondition).MinLifePercent && currentLifeVPercent <= (bossAIItemList[i].Condition as BloodChangedCondition).MaxLifePercent);

                                if (canExecActions)
                                {
                                    monster.RecBossAI(bossAIItemList[i]);
                                    execBossAIItemList.Add(bossAIItemList[i]);
                                }
                            }
                        }
                    }
                }
            }
            else if (eventObject.getEventType() == (int)EventTypes.MonsterLivingTime)
            {
                monster = (eventObject as MonsterLivingTimeEventObject).getMonster();
#if ___CC___FUCK___YOU___BB___
                int AIID = 0;
#else
                int AIID = monster.MonsterInfo.AIID;
#endif
                if (AIID > 0)
                {
                    bossAIItemList = BossAICachingMgr.FindCachingItem(AIID, (int)BossAITriggerTypes.LivingTime);

                    if (null != bossAIItemList)
                    {
                        lock (monster.TriggerMutex)
                        {
                            for (int i = 0; i < bossAIItemList.Count; i++)
                            {
                                if (!monster.CanExecBossAI(bossAIItemList[i]))
                                {
                                    continue; //如果不能执行
                                }

                                bool canExecActions = monster.GetMonsterLivingTicks() >= ((bossAIItemList[i].Condition as LivingTimeCondition).LivingMinutes * 60 * 1000);
                                if (canExecActions)
                                {
                                    monster.RecBossAI(bossAIItemList[i]);
                                    execBossAIItemList.Add(bossAIItemList[i]);
                                }
                            }
                        }
                    }
                }
            }

            if (null != execBossAIItemList)
            {
                for (int i = 0; i < execBossAIItemList.Count; i++)
                {
                    BossAIItem             bossAIItem          = execBossAIItemList[i];
                    List <MagicActionItem> magicActionItemList = null;
                    if (GameManager.SystemMagicActionMgr.BossAIActionsDict.TryGetValue(bossAIItem.ID, out magicActionItemList) && null != magicActionItemList)
                    {
                        for (int j = 0; j < magicActionItemList.Count; j++)
                        {
                            MagicAction.ProcessAction(monster, gameClient, magicActionItemList[j].MagicActionID, magicActionItemList[j].MagicActionParams);

                            //向地图中的用户广播特殊提示信息
                            if (!string.IsNullOrEmpty(bossAIItem.Desc))
                            {
                                GameManager.ClientMgr.BroadSpecialHintText(monster.CurrentMapCode, monster.CurrentCopyMapID, bossAIItem.Desc);
                            }
                        }
                    }
                }
            }
        }
예제 #22
0
 /// <summary>
 /// Listener attached to the DragTracker's onStart event. Cancel's the DataView's containerclick event from firing
 /// and sets the start co-ordinates of the Proxy element. Clears any existing DataView selection
 /// </summary>
 /// <param name="e"><p>The click event</p>
 /// </param>
 private void onStart(EventObject e)
 {
 }
 public void Dispatch(EventObject eventObject)
 {
     _eventDispatcher.Dispatch(eventObject);
 }
 public void RemoveObject(EventObject o)
 {
     listeners.Remove(o);
 }
예제 #25
0
 /// <summary>
 /// Listener attached to the DragTracker's onEnd event. This is a delayed function which executes 1
 /// millisecond after it has been called. This is because the dragging flag must remain active to cancel
 /// the containerclick event which the mouseup event will trigger.
 /// </summary>
 /// <param name="e"><p>The event object</p>
 /// </param>
 private void onEnd(EventObject e)
 {
 }
예제 #26
0
 private void RestartGame(EventObject evt)
 {
     followTarget       = true;
     transform.position = startPos;
 }
예제 #27
0
 private void EndGame(EventObject evt)
 {
     followTarget = false;
 }
예제 #28
0
    /**
     * @param currentEvent is the event received from the smart object
     * check if currentEvent is equal to the type of event that I expect
     */
    public void checkEvent(EventObject currentEvent)
    {
        lastRoueletteState = rouletteState;
        roulette           = GameObject.Find("Box8").GetComponent <Roulette>();
        rouletteState      = roulette.getState();

        if (rouletteState != 0)
        {
            desiredEventType = defineCategoryForState(rouletteState);
        }
        else
        {
            desiredEventType = 0;
        }
        //int desiredEventType = 2;



        if (desiredEventType == 0)
        {
            // I don't have a desired event to check
            return;
        }

        if (currentEvent.getDuration() != null)
        {
            //if duration=0 it is the first event of the sensor
            return;
        }
        else
        {
            switch (desiredEventType)
            {
            case 1:
                //hold the dolphin for 5 second
                conditionVerified = checkHoldDolphin(currentEvent);
                break;

            case 2:
                //cuddle the dolphin 3 times

                conditionVerified = checkCuddleDolphin(currentEvent);
                break;

            case 3:
                // RFID food
                conditionVerified = checkRfidFood(currentEvent);
                break;

            case 4:
                //RFID hygiene
                conditionVerified = checkRfidHygiene(currentEvent);
                break;

            case 5:
                //RFID entertainment
                conditionVerified = checkRfidEnterteinment(currentEvent);
                break;

            case 6:
                //RFID sleep
                conditionVerified = checkRfidSleep(currentEvent);
                break;
            }

            if (conditionVerified)
            {
                Debug.Log("Condition verified");


                if (desiredEventType != 2 & desiredEventType != 1)
                {
                    roulette.showRight(0);//0
                    roulette.playRight();
                    //CALL TO MIRKO'S CODE
                    ChoiceManager choiceManager = GameObject.Find("ChoiceManager").GetComponent <ChoiceManager>();
                    choiceManager.GenerateObjectsInWorld(rouletteState);
                }
                else
                {
                    if (desiredEventType == 2)
                    {
                        roulette.showRight(2); //2
                        roulette.playRight();
                    }
                    if (desiredEventType == 1)
                    {
                        roulette.showRight(1);//1
                        roulette.playRight();
                    }

                    //roulette.stopRoulette();
                    StartCoroutine(Wait());
                }
            }
            else
            {
                //if (currentEvent.getID() == TOUCH_SENSOR_CUDDLE && desiredEventType == 2)
                if (cuddleCount != 0)
                {
                    roulette.playRight();
                }
                else
                {
                    Debug.Log("Condition not verified");
                    if (desiredEventType == 1 && (currentEvent.getID() == TOUCH_SENSOR_CUDDLE | currentEvent.getID() == TOUCH_SENSOR_HOLD))
                    {
                        roulette.playRight();
                    }
                    else
                    {
                        roulette.playWrong();
                        roulette.showWrong();
                    }
                    if (desiredEventType == 2)
                    {
                        ProgressIndicator.Instance.SetProgress(0f);
                    }
                }
            }
        }
    }
 public void AddObject(EventObject o)
 {
     listeners.Add(o);
 }
예제 #30
0
 /// <summary>
 /// Listener attached to the DragTracker's onDrag event. Figures out how large the drag selection area should be and
 /// updates the proxy element's size to match. Then iterates over all of the rendered items and marks them selected
 /// if the drag region touches them
 /// </summary>
 /// <param name="e"><p>The drag event</p>
 /// </param>
 private void onDrag(EventObject e)
 {
 }
 public void disposing(EventObject source)
 {
 }
 public static void PlayStandEventHandler(string type, EventObject eventObj)
 {
     eventObj.armature.animation.Reset();
     //Player.print ("Stand");
     eventObj.armature.animation.GotoAndPlayByFrame("Stand");
 }
 /// <summary>
 /// returns true if the picker has a load mask and the passed event is within the load mask
 /// </summary>
 /// <param name="e">
 /// </param>
 /// <returns>
 /// <span><see cref="bool">Boolean</see></span><div>
 /// </div>
 /// </returns>
 private bool isEventWithinPickerLoadMask(EventObject e)
 {
     return(false);
 }
예제 #34
0
        public void processEvent(EventObject eventObject)
        {
            if (eventObject.getEventType() == (int)EventTypes.MonsterDead)
            {
                MonsterDeadEventObject deadEv = eventObject as MonsterDeadEventObject;
                if (deadEv.getAttacker().ClientData.CopyMapID > 0 && deadEv.getAttacker().ClientData.FuBenSeqID > 0 &&
                    deadEv.getAttacker().ClientData.MapCode == this.MapCode &&
                    deadEv.getMonster().CurrentMapCode == this.MapCode
                    )
                {
                    MoRiMonsterTag tag = deadEv.getMonster().Tag as MoRiMonsterTag;
                    if (tag == null)
                    {
                        return;
                    }

                    MoRiJudgeCopy judgeCopy = null;
                    lock (copyDict)
                    {
                        if (!copyDict.TryGetValue(tag.CopySeqId, out judgeCopy))
                        {
                            return;
                        }
                    }

                    long killMs = 0;
                    lock (judgeCopy)
                    {
                        // 只有在战斗阶段的杀怪才有效
                        if (judgeCopy.m_eStatus != GameSceneStatuses.STATUS_BEGIN)
                        {
                            return;
                        }

                        // 只有一条命
                        if (judgeCopy.MonsterList[tag.MonsterIdx].DeathMs > 0)
                        {
                            return;
                        }

                        judgeCopy.MonsterList[tag.MonsterIdx].DeathMs = TimeUtil.NOW();


                        // 通知怪物死亡事件
                        GameManager.ClientMgr.BroadSpecialCopyMapMessageStr(
                            (int)TCPGameServerCmds.CMD_NTF_MORI_MONSTER_EVENT,
                            string.Format("{0}:{1}:{2}:{3}", (int)MoRiMonsterEvent.Death, BossConfigList[tag.MonsterIdx].Id, judgeCopy.MonsterList[tag.MonsterIdx].BirthMs, judgeCopy.MonsterList[tag.MonsterIdx].DeathMs),
                            judgeCopy.MyCopyMap);

                        CalcAwardRate(judgeCopy);

                        /*
                         * FuBenInfoItem fbItem = FuBenManager.FindFuBenInfoBySeqID(judgeCopy.MyCopyMap.FuBenSeqID);
                         * if (fbItem != null)
                         * {
                         *  fbItem.AwardRate += CalcAwardRate(judgeCopy);
                         * }*/

                        if (judgeCopy.MonsterList.Count == BossConfigList.Count)
                        {
                            judgeCopy.Passed    = true;
                            judgeCopy.m_eStatus = GameSceneStatuses.STATUS_END;
                        }
                    }
                }
            }
        }
 /// <summary>
 /// Fires when the mouse key is released.
 /// </summary>
 /// <param name="this">
 /// </param>
 /// <param name="e">
 /// </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 mouseup(ClickRepeater @this, EventObject e, object eOpts)
 {
 }
 public void StopMatchMaker(EventObject evt = null)
 {
     NetworkManager.singleton.StopMatchMaker();
 }
예제 #37
0
 private void OnAnimationEventHandler(string type, EventObject eventObject)
 {
     UnityEngine.Debug.Log(string.Format("animationName:{0},eventType:{1},eventName:{2}", eventObject.animationState.name, type, eventObject.name));
 }
 public void CloseApp(EventObject evt = null)
 {
     Application.Quit();
 }
예제 #39
0
 /// <summary>
 /// Called whenever a dragstart or drag event is received on the associated Thumb.
 /// Aligns the Tip with the Thumb's new position.
 /// </summary>
 /// <param name="slider"><p>The slider</p>
 /// </param>
 /// <param name="e"><p>The Event object</p>
 /// </param>
 /// <param name="thumb"><p>The thumb that the Tip is attached to</p>
 /// </param>
 private void onSlide(Multi slider, EventObject e, Thumb thumb)
 {
 }
예제 #40
0
 /// <summary>
 /// Parameters<li><span>view</span> : <see cref="Ext.view.Table">Ext.view.Table</see><div>
 /// </div></li><li><span>node</span> : HTMLElement<div>
 /// </div></li><li><span>group</span> : <see cref="String">String</see><div><p>The name of the group</p>
 /// </div></li><li><span>e</span> : <see cref="Ext.EventObject">Ext.EventObject</see><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="view">
 /// </param>
 /// <param name="node">
 /// </param>
 /// <param name="group"><p>The name of the group</p>
 /// </param>
 /// <param name="e">
 /// </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 groupcontextmenu(Ext.view.Table view, object node, JsString group, EventObject e, object eOpts)
 {
 }
 public void JoinAsClient(EventObject evt = null)
 {
     CheckHostAddress ();
     NetworkManager.singleton.StartClient();
 }
 /// <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){}
 public void StartAsServer(EventObject evt = null)
 {
     NetworkManager.singleton.StopServer();
     NetworkManager.singleton.networkAddress = "localhost";
     NetworkManager.singleton.StartServer();
 }
예제 #44
0
		protected void CreateFilmBox(FilmSession filmSession, FilmBox filmBox)
		{
			var referencedFilmSessionSequence = new ReferencedInstanceSequenceIod
			{
				ReferencedSopClassUid = SopClass.BasicFilmSessionSopClassUid,
				ReferencedSopInstanceUid = filmSession.SopInstanceUid.UID
			};

			filmBox.ReferencedFilmSessionSequenceList.Add(referencedFilmSessionSequence);

			var message = new DicomMessage(null, (DicomAttributeCollection)filmBox.DicomAttributeProvider);
			this.Client.SendNCreateRequest(null, GetPresentationContextId(this.AssociationParameters), this.Client.NextMessageID(), message, DicomUids.BasicFilmBoxSOP);
			_eventObject = EventObject.FilmBox;
			Platform.Log(LogLevel.Debug, "Creating film box...");
		}
    private void HandleInputFieldChange(EventObject evt)
    {
        if(evt.Params[0] != null) {
            InputFieldVO data = (InputFieldVO)evt.Params[0];

            if(data.inputKey == InputFieldKeys.MenuIPInput) {
                ipAddress = data.inputValue;
                if(NetworkManager.singleton != null) NetworkManager.singleton.networkAddress = ipAddress;
            }
        }
    }
예제 #46
0
		protected void PrintFilmBox(FilmBox filmBox)
		{
			var message = new DicomMessage(null, null)
			{
				RequestedSopInstanceUid = filmBox.SopInstanceUid.UID,
				RequestedSopClassUid = SopClass.BasicFilmBoxSopClassUid,
				ActionTypeId = 1
			};

			this.Client.SendNActionRequest(GetPresentationContextId(this.AssociationParameters), this.Client.NextMessageID(), message);
			_eventObject = EventObject.FilmBox;
			Platform.Log(LogLevel.Debug, "Printing film box...");
		}
예제 #47
0
 /// <summary>
 /// Method for filtering out the map argument
 /// </summary>
 /// <param name="keyCode">
 /// </param>
 /// <param name="event">
 /// </param>
 /// <param name="options"><p>Contains the handler to call</p>
 /// </param>
 private void handleEvent(JsNumber keyCode, EventObject @event, object options)
 {
 }
 /// <summary>
 /// The function that should handle the trigger's click event. This method does nothing by default until overridden
 /// by an implementing function. See Ext.form.field.ComboBox and Ext.form.field.Date for sample implementations.
 /// </summary>
 /// <param name="e">
 /// </param>
 protected void onTriggerClick(EventObject e)
 {
 }
 public void HostLan(EventObject evt = null)
 {
     isHost = true;
     CheckHostAddress();
     NetworkManager.singleton.StartHost();
 }
예제 #50
0
 void Test(string type, EventObject eventObject)
 {
     //print(type+" ???time  "+eventObject);
 }
 public void JoinRoom(EventObject evt = null)
 {
     NetworkManager.singleton.matchMaker.ListMatches(0, 20, "", delegate(ListMatchResponse response) {
         NetworkManager.singleton.OnMatchList(response);
         foreach(MatchDesc m in response.matches) {
             Debug.Log(m.name);
             if(m.name == "default") {
                 NetworkManager.singleton.matchName = m.name;
                 NetworkManager.singleton.matchSize = (uint)m.currentSize;
                 NetworkManager.singleton.matchMaker.JoinMatch(m.networkId, "", NetworkManager.singleton.OnMatchJoined);
                 SetInfoText("Found game, joining...");
             }
         }
         if(response.matches == null || response.matches.Count == 0) {
             SetInfoText("No online games found, create one!");
         }
     });
 }
예제 #52
0
 protected override void handleConnectFail(EventObject e)
 {
     base.handleConnectFail(e);
     NetStateManager.GetInstance().changeNetState(NET_STATE.STATE_RECONNECT);
 }
예제 #53
0
		protected void CreateFilmSession(FilmSession filmSession)
		{
			var message = new DicomMessage(null, (DicomAttributeCollection)filmSession.DicomAttributeProvider);
			this.Client.SendNCreateRequest(null, GetPresentationContextId(this.AssociationParameters), this.Client.NextMessageID(), message, DicomUids.BasicFilmSession);
			_eventObject = EventObject.FilmSession;

			Platform.Log(LogLevel.Debug, "Creating film session...");
		}
예제 #54
0
 private void EndGame(EventObject evt)
 {
     playing = false;
 }
예제 #55
0
		protected void SetImageBox(ImageBox imageBox)
		{
			var message = new DicomMessage(null, (DicomAttributeCollection)imageBox.DicomAttributeProvider)
			{
				RequestedSopClassUid = this.ColorMode == ColorMode.Color ? SopClass.BasicColorImageBoxSopClassUid : SopClass.BasicGrayscaleImageBoxSopClassUid,
				RequestedSopInstanceUid = imageBox.SopInstanceUid.UID
			};

			this.Client.SendNSetRequest(GetPresentationContextId(this.AssociationParameters), this.Client.NextMessageID(), message);
			_eventObject = EventObject.ImageBox;
			Platform.Log(LogLevel.Debug, "Setting image box {0}...", _numberOfImageBoxesSent);
		}
예제 #56
0
 private void StartGame(EventObject evt)
 {
     playing = true;
 }
예제 #57
0
		protected void DeleteFilmSession(FilmSession filmSession)
		{
			var message = new DicomMessage(null, null)
			{
				RequestedSopInstanceUid = filmSession.SopInstanceUid.UID,
				RequestedSopClassUid = SopClass.BasicFilmSessionSopClassUid
			};

			this.Client.SendNDeleteRequest(GetPresentationContextId(this.AssociationParameters), this.Client.NextMessageID(), message);
			_eventObject = EventObject.FilmSession;
			Platform.Log(LogLevel.Debug, "Deleting film session...");
		}
예제 #58
0
 public MappingManager(EventObject eventObject)
 {
     _eventObject = eventObject;
 }
예제 #59
0
 /// <summary>
 /// Respond to the mouse wheel event
 /// </summary>
 /// <param name="e">
 /// </param>
 private void handleMouseWheel(EventObject e){}
 public void disposing(EventObject Source)
 {
     throw new NotImplementedException();
 }