Beispiel #1
0
            private void OnDestroy()
            {
                UnityEngine.Object.Destroy((UnityEngine.Object) this.mScene);
                EventDialogBubble.DiscardAll();
                EventDialogBubbleCustom.DiscardAll();
                EventStandCharaController2.DiscardAll();
                for (int index = 0; index < this.Actions.Length; ++index)
                {
                    UnityEngine.Object.Destroy((UnityEngine.Object) this.Actions[index]);
                }
                if (!UnityEngine.Object.op_Inequality((UnityEngine.Object)EventScript.Canvas, (UnityEngine.Object)null))
                {
                    return;
                }
                ((UnityEvent)((Button)((Component)EventScript.Canvas).GetComponent <Button>()).get_onClick()).RemoveListener(this.mClickAction);
                HoldGesture component = (HoldGesture)((Component)EventScript.Canvas).GetComponent <HoldGesture>();

                if (UnityEngine.Object.op_Inequality((UnityEngine.Object)component, (UnityEngine.Object)null))
                {
                    // ISSUE: method pointer
                    component.OnHoldStart.RemoveListener(new UnityAction((object)this, __methodptr(OnDown)));
                    // ISSUE: method pointer
                    component.OnHoldEnd.RemoveListener(new UnityAction((object)this, __methodptr(OnUp)));
                }
                EventScript.DestroyCanvas();
            }
Beispiel #2
0
 public EventScript.Sequence OnStandbyGrid(TacticsUnitController controller, bool isFirstPlay)
 {
     return(this.StartSequence((EventScript.TestCondition)(trigger =>
     {
         IntVector2 intVector2Grid = EventScript.ConvToIntVector2Grid(trigger.GridXY);
         if (trigger.Trigger == EventScript.ScriptSequence.StartConditions.StandbyGrid && (!trigger.IsFirstOnly || isFirstPlay) && (this.IsContainsUnit(trigger.UnitName, controller, (TacticsUnitController)null) && controller.Unit.x == intVector2Grid.x))
         {
             return controller.Unit.y == intVector2Grid.y;
         }
         return false;
     }), true, 0));
 }
Beispiel #3
0
 private void OnDestroy()
 {
     UnityEngine.Object.Destroy((UnityEngine.Object) this.mScene);
     EventDialogBubble.DiscardAll();
     EventDialogBubbleCustom.DiscardAll();
     EventStandCharaController2.DiscardAll();
     for (int index = 0; index < this.Actions.Length; ++index)
     {
         UnityEngine.Object.Destroy((UnityEngine.Object) this.Actions[index]);
     }
     if (!UnityEngine.Object.op_Inequality((UnityEngine.Object)EventScript.Canvas, (UnityEngine.Object)null))
     {
         return;
     }
     ((UnityEvent)((Button)((Component)EventScript.Canvas).GetComponent <Button>()).get_onClick()).RemoveListener(this.mClickAction);
     EventScript.DestroyCanvas();
 }
Beispiel #4
0
        public EventScript.Sequence OnUnitRestHP(TacticsUnitController controller, bool isFirstPlay)
        {
            return(this.StartSequence((EventScript.TestCondition)(trigger =>
            {
                EventScript.cRestHP objectRestHp = EventScript.ConvToObjectRestHP(trigger.RestHP);
                bool flag = true;
                using (List <EventScript.cRestHP.Cond> .Enumerator enumerator = objectRestHp.mCondLists.GetEnumerator())
                {
                    while (enumerator.MoveNext())
                    {
                        EventScript.cRestHP.Cond current = enumerator.Current;
                        int num = 0;
                        switch (current.mCalc)
                        {
                        case EventScript.cRestHP.Cond.CalcType.SCALE:
                            num = controller.HPPercentage;
                            break;

                        case EventScript.cRestHP.Cond.CalcType.FIXED:
                            num = (int)controller.Unit.CurrentStatus.param.hp;
                            break;
                        }
                        switch (current.mComp)
                        {
                        case EventScript.cRestHP.Cond.CompType.EQUAL:
                            if (num != current.mVal)
                            {
                                flag = false;
                                break;
                            }
                            break;

                        case EventScript.cRestHP.Cond.CompType.NOT_EQUAL:
                            if (num == current.mVal)
                            {
                                flag = false;
                                break;
                            }
                            break;

                        case EventScript.cRestHP.Cond.CompType.GREATER:
                            if (num <= current.mVal)
                            {
                                flag = false;
                                break;
                            }
                            break;

                        case EventScript.cRestHP.Cond.CompType.GREATER_EQUAL:
                            if (num < current.mVal)
                            {
                                flag = false;
                                break;
                            }
                            break;

                        case EventScript.cRestHP.Cond.CompType.LESS:
                            if (num >= current.mVal)
                            {
                                flag = false;
                                break;
                            }
                            break;

                        case EventScript.cRestHP.Cond.CompType.LESS_EQUAL:
                            if (num > current.mVal)
                            {
                                flag = false;
                                break;
                            }
                            break;
                        }
                        if (!flag)
                        {
                            break;
                        }
                    }
                }
                if (trigger.Trigger == EventScript.ScriptSequence.StartConditions.RestHP && (!trigger.IsFirstOnly || isFirstPlay) && controller.IsA(trigger.UnitName))
                {
                    return flag;
                }
                return false;
            }), true, 0));
        }