Exemplo n.º 1
0
    public void ActionEvent(Action source, GameObject gameObjectParam = null, ActionEventType events = ActionEventType.Compeleted,
                            int intParam = 0, string strParam = null)
    {
        UFOFactory ufofactory = Singleton <UFOFactory> .Instance;

        ufofactory.freeUFO(gameObjectParam);
    }
Exemplo n.º 2
0
 private void OnEventHandler(ActionNode node, ActionEventType eventType)
 {
     if (eventType == ActionEventType.action_end)
     {
         LeanTween.delayedCall(1.3f, Restart);
     }
 }
 public void ActionEvent(Action source, ActionEventType events = ActionEventType.Completed, int intParam = 0, string strParam = null, Object objParam = null)
 {
     disks.recycleUFO(source.gameObject);
     seq.Remove(source as MoveAction);
     source.destory = true;
     if (FirstSceneController.times >= 30)
     {
         sceneController.flag = 1;
     }
 }
 public void ActionEvent(Action source, ActionEventType events = ActionEventType.Competeted,
                         int intParam = 0, string strParam = null, GameObject gameObjectParam = null)
 {
     if (source == moveToLeft)
     {
         this.RunAction(gameObjectParam, moveToLeft, this);
     }
     if (source == moveToRight)
     {
         this.RunAction(gameObjectParam, moveToRight, this);
     }
 }
Exemplo n.º 5
0
        public ActionEventArgs(ActionEventType actionType, ActionReply reply, string message, long maxPercent, long currentPercent)
        {
            ActionType    = actionType;
            RecievedReply = reply;
            Message       = message;
            _max          = maxPercent;
            _current      = currentPercent;

            var dt = DateTime.Now;

            CurrentShortDateTime = dt.ToShortTimeString();
            CurrentLongDateTime  = string.Format("{0}/{1}/{2} - {3}", dt.Day.ToString("00"), dt.Month.ToString("00"),
                                                 dt.Year.ToString("00"), CurrentShortDateTime);
        }
Exemplo n.º 6
0
 public void ActionEvent(Action source, GameObject gameObjectParam = null, ActionEventType events = ActionEventType.Compeleted,
                         int intParam = 0, string strParam = null)
 {
     if (events == ActionEventType.Started)
     {
         slowFlyAction   = FlyAction.getAction(new Vector3(Random.Range(-1, 1f), Random.Range(-1, 1f)), slowSpeed);
         middleFlyAction = FlyAction.getAction(new Vector3(Random.Range(-1, 1f), Random.Range(-1, 1f)), middleSpeed);
         fastFlyAction   = FlyAction.getAction(new Vector3(Random.Range(-1, 1f), Random.Range(-1, 1f)), fastSpeed);
         this.RunAction(gameObjectParam, source, this);
     }
     else if (events == ActionEventType.Compeleted)
     {
         UFOFactory ufofactory = Singleton <UFOFactory> .Instance;
         ufofactory.freeUFO(gameObjectParam);
     }
 }
Exemplo n.º 7
0
 private void OnEventHandler(ActionNode node, ActionEventType eventType)
 {
     switch (eventType)
     {
     case ActionEventType.action_end:
         if (IsEnd())
         {
             crtNodeIndex = 0;
             OnEnd();
         }
         else
         {
             crtNodeIndex++;
             OnNext();
         }
         break;
     }
 }
Exemplo n.º 8
0
 private void OnEventHandler(ActionNode node, ActionEventType eventType)
 {
     switch (eventType)
     {
     case ActionEventType.action_end:
         RemoveNode(node);
         node.OnDispose();
         if (IsEnd())
         {
             OnEnd();
         }
         else
         {
             OnNext();
         }
         break;
     }
 }
Exemplo n.º 9
0
 public void ActionEvent(Action source, GameObject gameObjectParam = null, ActionEventType events = ActionEventType.Compeleted,
                         int intParam = 0, string strParam = null)
 {
     source.destroy = false;
     this.start++;
     if (start >= sequence.Count)
     {
         this.start = 0;
         if (repeat > 0)
         {
             repeat--;
         }
         if (repeat == 0)
         {
             this.destroy = true;
             Callback.ActionEvent(this);
         }
     }
 }
Exemplo n.º 10
0
			public ActionEvent(BehaviorNodes.Action action, ActionEventType type, BehaviorExecutionContext bec) {
				this.Type = type;
				this.Action = action;
                this.BEC = bec;
			}
Exemplo n.º 11
0
 public static ActionEvent CreateEvent(ActionEventType type, object target)
 {
     return(target == null ? EmptyEvents[type] : new ActionEvent(type, target));
 }
Exemplo n.º 12
0
 private ActionEvent(ActionEventType type, object target)
 {
     Type   = type;
     Target = target;
 }
Exemplo n.º 13
0
 protected ValueTask <ActionEvent> NotifyActionEventAsync(ActionEventType type, object target = null)
 => NotifyActionEventAsync(ActionEvent.Create(type, target));
Exemplo n.º 14
0
 /// <summary>
 /// An extension method that gets the MessageTemplate setting for the specified event type from the settings collection.
 /// </summary>
 /// <param name="settings">The settings collection.</param>
 /// <param name="eventType">Type of the event.</param>
 /// <returns>Returns a System.String representing the template or null if the template doesn't exist.</returns>
 public static string MessageTemplate(this Settings.SettingsCollection settings, ActionEventType eventType)
 {
     return(settings.GetCustomSetting <string>($"MessageTemplate-{eventType.EventType}"));
 }
Exemplo n.º 15
0
 protected virtual Task<ActionEvent> NotifyActionEventAsync(ActionEventType type, object target = null)
 {
     return NotifyActionEventAsync(ActionEvent.CreateEvent(type, target));
 }
Exemplo n.º 16
0
    private void OnEventHandler(ActionNode node, ActionEventType eventType)
    {
        switch (eventType)
        {
        case ActionEventType.action_end:
            switch (FightModule.crtFightStadus)
            {
            case FightStadus.eliminate:
                AudioModel.Instance.ClearAllActorSound();
                SkillModel.Instance.SkillEnd();
                PlayPutAutoSkill();
                break;

            case FightStadus.prop_eliminate:
                Filling(FightStadus.prop_move);
                break;

            case FightStadus.deduct:
                Filling();
                break;

            case FightStadus.auto_skill:
                UnlockHide();
                break;

            case FightStadus.unlock_hide:
                UnlockMonster(false);
                fightUI.skillListPart.gameObject.SetActive(false);
                break;

            case FightStadus.unlock_monster:
                fightUI.CollectUnlocks(HideModel.Instance.backUpUnLocks);
                fightUI.CollectUnlocks(MonsterModel.Instance.backUpUnLocks);
                Filling();
                break;

            case FightStadus.move:
                Crawl();
                break;

            case FightStadus.crawl:
                CreateCrawl();
                UnlockMonster(true);
                break;

            case FightStadus.jet_monster:
                Invade();
                break;

            case FightStadus.invade:
                Flow();
                break;

            case FightStadus.floor_flow:
                Changer();
                break;

            case FightStadus.changer:
                CoverMove();
                break;

            case FightStadus.coverMove:
            case FightStadus.prop_move:
                AudioModel.Instance.ClearAllActorSound();
                if (FightModel.Instance.fightInfo.isWin)
                {
                    SkillModel.Instance.SkillEnd();
                    if (FightModel.Instance.fightInfo.stepLeft > 0 || SkillModel.Instance.fighting_entitys.Count > 0)
                    {//扣除剩余次数
                        DeductStep();
                    }
                    else
                    {//完成退出
                        EndWin();
                    }
                }
                else
                {
                    CellModel.Instance.Clear();
                    if (FightModel.Instance.fightInfo.stepLeft > 0)
                    {//继续
                        FightModule.crtFightStadus = FightStadus.idle;
                        if (fightModule.CheckRoll())
                        {
                            PromptModel.Instance.Pop(LanguageUtil.GetTxt(11403));
                        }
                        else
                        {
                            CheckAutoRefresh();
                        }
                    }
                    else
                    {//购买次数还是退出
                        PropInfo propInfo = PropModel.Instance.GetProp(10004);
                        if (propInfo.isForbid)
                        {
                            ModuleModel.Instance.AddUIModule((int)ModuleEnum.REPORT);
                        }
                        else
                        {
                            CheckAutoRefresh();
                            fightUI.stepShortPart.Show(true);
                        }
                    }
                    ClearListStadus();
                }

                break;

            case FightStadus.prop_refresh:
                FightModule.crtFightStadus = FightStadus.idle;
                break;

            case FightStadus.open_fill:
                FightModule.crtFightStadus = FightStadus.idle;
                CheckAutoRefresh();
                break;

            case FightStadus.end_win:
                ModuleModel.Instance.AddUIModule((int)ModuleEnum.REPORT);
                break;
            }
            break;
        }
    }
Exemplo n.º 17
0
 public static ActionEvent Create(ActionEventType type, object target) => new ActionEvent(type, target);
Exemplo n.º 18
0
 public void ActionEvent(Action source, GameObject gameObjectParam = null, ActionEventType events = ActionEventType.Compeleted,
                         int intParam = 0, string strParam = null)
 {
 }
Exemplo n.º 19
0
 public ActionEventArgs(ActionEventType actionType, string message, long maxProgress, long curProgress) : this(actionType, null, message, maxProgress, curProgress)
 {
 }
Exemplo n.º 20
0
 public ActionEventArgs(ActionEventType actionType, string message) : this(actionType, null, message, -1, -1)
 {
 }
Exemplo n.º 21
0
 public ActionEventArgs(ActionEventType actionType, ActionReply reply) : this(actionType, reply, null, -1, -1)
 {
 }
Exemplo n.º 22
0
        private void ActionLog(ActionEventType actionType, ActionReply reply, long maxProgress, long curProgress)
        {
            var args = new ActionEventArgs(actionType, reply, "", maxProgress, curProgress);

            SystemActionLog(args);
        }
Exemplo n.º 23
0
 private void ActionLog(ActionEventType actionType, ActionReply reply)
 {
     ActionLog(actionType, reply, 0, 0);
 }
Exemplo n.º 24
0
 public ActionEvent(ActionEventType type, object target)
 {
     Type   = type;
     Target = target;
 }
Exemplo n.º 25
0
        private void ActionLog(ActionEventType actionType, string message, long maxProgress, long curProgress)
        {
            var args = new ActionEventArgs(actionType, null, message, maxProgress, curProgress);

            SystemActionLog(args);
        }
Exemplo n.º 26
0
 protected virtual Task <ActionEvent> NotifyActionEventAsync(ActionEventType type, object target = null)
 {
     return(NotifyActionEventAsync(ActionEvent.CreateEvent(type, target)));
 }
Exemplo n.º 27
0
 private void ActionLog(ActionEventType actionType, string format, params object[] param)
 {
     ActionLog(actionType, string.Format(format, param), 0, 0);
 }
Exemplo n.º 28
0
 public void ActionEvent(Action source, ActionEventType events = ActionEventType.Completed, int intParam = 0, string strParam = null, object objectParam = null)
 {
 }
Exemplo n.º 29
0
 public ActionEvent(ActionEventType type, T target)
     : this(type, (object)target)
 {
 }