public static bool Condition()
        {
            if (!MapUIContainer.IsInstance())
            {
                return(false);
            }

            if (current != null && !current.IsActiveControl)
            {
                Manager.Input input = Manager.Input.Instance;
                current = null;

                input.ReserveState(Manager.Input.ValidType.Action);
                input.SetupState();
                Map.Instance.Player.Controller.ChangeState("Normal");
            }

            SystemMenuUI ui = MapUIContainer.SystemMenuUI;

            if (!ui.IsActiveControl || !ui.HomeMenu.IsActiveControl)
            {
                return(false);
            }

            return(true);
        }
Exemplo n.º 2
0
 public void OnUpdateInput()
 {
     Manager.Input instance = Singleton <Manager.Input> .Instance;
     foreach (ICommandData systemCommand in this._systemCommands)
     {
         systemCommand.Invoke(instance);
     }
 }
Exemplo n.º 3
0
        protected override void OnUpdate(PlayerActor actor, ref Actor.InputInfo info)
        {
            Singleton <Manager.Map> .Instance.CheckStoryProgress();

            if (actor.Animation.PlayingInLocoAnimation)
            {
                return;
            }
            this._onEndInAnimation.OnNext(Unit.get_Default());
            Manager.Input instance    = Singleton <Manager.Input> .Instance;
            PlayerActor   playerActor = actor;

            if (instance.State == Manager.Input.ValidType.Action)
            {
                Transform  transform = ((Component)playerActor.CameraControl).get_transform();
                Vector2    moveAxis  = instance.MoveAxis;
                Quaternion rotation  = transform.get_rotation();
                Vector3    vector3   = Quaternion.op_Multiply(Quaternion.Euler(0.0f, (float)((Quaternion) ref rotation).get_eulerAngles().y, 0.0f), Vector3.ClampMagnitude(new Vector3((float)moveAxis.x, 0.0f, (float)moveAxis.y), 1f));
                info.move = vector3;
                if (UnityEngine.Input.GetKeyDown((KeyCode)325) || UnityEngine.Input.GetKeyDown((KeyCode)282))
                {
                    playerActor.PlayerController.ChangeState("Menu");
                }
                else
                {
                    if (!UnityEngine.Input.GetKeyDown((KeyCode)109))
                    {
                        return;
                    }
                    if (Singleton <MapUIContainer> .Instance.MinimapUI.VisibleMode == 0)
                    {
                        playerActor.Controller.ChangeState("WMap");
                    }
                    else
                    {
                        if (Singleton <MapUIContainer> .Instance.MinimapUI.VisibleMode != 2)
                        {
                            return;
                        }
                        if (Manager.Config.GameData.MiniMap)
                        {
                            Singleton <MapUIContainer> .Instance.MinimapUI.OpenMiniMap();
                        }
                        else
                        {
                            playerActor.Controller.ChangeState("WMap");
                        }
                    }
                }
            }
            else
            {
                info.move = Vector3.get_zero();
                Transform transform = ((Component)playerActor.CameraControl).get_transform();
                info.lookPos = Vector3.op_Addition(((Component)actor).get_transform().get_position(), Vector3.op_Multiply(transform.get_forward(), 100f));
            }
        }
Exemplo n.º 4
0
        private void SetActiveControl(bool isActive)
        {
            Manager.Input instance = Singleton <Manager.Input> .Instance;
            IEnumerator   coroutine;

            if (isActive)
            {
                instance.FocusLevel   = 0;
                instance.MenuElements = this.MenuUIList;
                coroutine             = this.DoOpen();
            }
            else
            {
                instance.ClearMenuElements();
                instance.FocusLevel = 0;
                coroutine           = this.DoClose();
            }
            if (this._fadeDisposable != null)
            {
                this._fadeDisposable.Dispose();
            }
            this._fadeDisposable = ObservableExtensions.Subscribe <Unit>((IObservable <M0>)Observable.FromCoroutine((Func <IEnumerator>)(() => coroutine), false), (System.Action <M0>)(_ => {}), (System.Action <Exception>)(ex => Debug.LogException(ex)));
        }
Exemplo n.º 5
0
        private void SetActiveControl(bool active)
        {
            Manager.Input instance = Singleton <Manager.Input> .Instance;
            IEnumerator   coroutine;

            if (active)
            {
                ((ReactiveProperty <int>) this._selectedID).set_Value(-1);
                Time.set_timeScale(0.0f);
                Dictionary <int, AgentData> agentTable = Singleton <Game> .Instance.WorldData.AgentTable;
                for (int key = 0; key < 4; ++key)
                {
                    AgentData      agentData      = agentTable[key];
                    ChaFileControl chaFileControl = new ChaFileControl();
                    if (!agentData.CharaFileName.IsNullOrEmpty() && chaFileControl.LoadCharaFile(agentData.CharaFileName, (byte)1, false, true))
                    {
                        string          empty = string.Empty;
                        VoiceInfo.Param obj;
                        string          str = Singleton <Manager.Voice> .Instance.voiceInfoDic.TryGetValue(chaFileControl.parameter.personality, out obj) ? obj.Personality : "不明";

                        this._infos[key] = new GameCharaFileInfo()
                        {
                            name             = chaFileControl.parameter.fullname,
                            personality      = str,
                            voice            = chaFileControl.parameter.personality,
                            hair             = chaFileControl.custom.hair.kind,
                            birthMonth       = (int)chaFileControl.parameter.birthMonth,
                            birthDay         = (int)chaFileControl.parameter.birthDay,
                            strBirthDay      = chaFileControl.parameter.strBirthDay,
                            sex              = (int)chaFileControl.parameter.sex,
                            FullPath         = string.Format("{0}chara/female/{1}.png", (object)UserData.Path, (object)agentData.CharaFileName),
                            FileName         = agentData.CharaFileName,
                            gameRegistration = chaFileControl.gameinfo.gameRegistration,
                            flavorState      = new Dictionary <int, int>((IDictionary <int, int>)chaFileControl.gameinfo.flavorState),
                            phase            = chaFileControl.gameinfo.phase,
                            normalSkill      = new Dictionary <int, int>((IDictionary <int, int>)chaFileControl.gameinfo.normalSkill),
                            hSkill           = new Dictionary <int, int>((IDictionary <int, int>)chaFileControl.gameinfo.hSkill),
                            favoritePlace    = chaFileControl.gameinfo.favoritePlace,
                            futanari         = chaFileControl.parameter.futanari,
                            lifeStyle        = chaFileControl.gameinfo.lifestyle,
                            data_uuid        = chaFileControl.dataID
                        };
                    }
                    else
                    {
                        this._infos[key] = (GameCharaFileInfo)null;
                    }
                    if (this._infos[key] != null)
                    {
                        this._charaTexts[key].set_text(this._infos[key].name ?? "-----");
                    }
                    else
                    {
                        this._charaTexts[key].set_text("-----");
                    }
                    this._objFemaleParameterWindow.SetActiveIfDifferent(false);
                    ((UnityEngine.Component) this._charaButtons[key]).get_gameObject().SetActiveIfDifferent(agentData.OpenState);
                    if (((UnityEngine.Component) this._charaButtons[key]).get_gameObject().get_activeSelf())
                    {
                        ((Selectable)this._charaButtons[key]).set_interactable(agentTable.ContainsKey(key) && !agentTable[key].CharaFileName.IsNullOrEmpty());
                    }
                }
                instance.FocusLevel   = 0;
                instance.MenuElements = this.MenuUIList;
                coroutine             = this.OpenCoroutine();
            }
            else
            {
                instance.ClearMenuElements();
                instance.FocusLevel = -1;
                coroutine           = this.CloseCoroutine();
            }
            if (this._fadeDisposable != null)
            {
                this._fadeDisposable.Dispose();
            }
            this._fadeDisposable = ObservableExtensions.Subscribe <Unit>((IObservable <M0>)Observable.FromCoroutine((Func <IEnumerator>)(() => coroutine), false), (System.Action <M0>)(_ => {}), (System.Action <Exception>)(ex => Debug.LogException(ex)));
        }
Exemplo n.º 6
0
 private void SetActiveControlMapSelect(bool active)
 {
     // ISSUE: object of a compiler-generated type is created
     // ISSUE: variable of a compiler-generated type
     CharaMigrateUI.\u003CSetActiveControlMapSelect\u003Ec__AnonStoreyD selectCAnonStoreyD = new CharaMigrateUI.\u003CSetActiveControlMapSelect\u003Ec__AnonStoreyD();
     // ISSUE: reference to a compiler-generated field
     selectCAnonStoreyD.active = active;
     // ISSUE: reference to a compiler-generated field
     selectCAnonStoreyD.\u0024this = this;
     Manager.Input instance = Singleton <Manager.Input> .Instance;
     // ISSUE: reference to a compiler-generated field
     if (selectCAnonStoreyD.active)
     {
         foreach (MigrateMapSelectNodeUI node in this._nodes)
         {
             if (!Object.op_Equality((Object)node, (Object)null))
             {
                 Object.Destroy((Object)((UnityEngine.Component)node).get_gameObject());
             }
         }
         this._nodes.Clear();
         using (Dictionary <int, AssetBundleInfo> .Enumerator enumerator = Singleton <Resources> .Instance.Map.MapList.GetEnumerator())
         {
             while (enumerator.MoveNext())
             {
                 KeyValuePair <int, AssetBundleInfo> current = enumerator.Current;
                 // ISSUE: object of a compiler-generated type is created
                 // ISSUE: variable of a compiler-generated type
                 CharaMigrateUI.\u003CSetActiveControlMapSelect\u003Ec__AnonStoreyC selectCAnonStoreyC = new CharaMigrateUI.\u003CSetActiveControlMapSelect\u003Ec__AnonStoreyC();
                 // ISSUE: reference to a compiler-generated field
                 selectCAnonStoreyC.\u003C\u003Ef__ref\u002413 = selectCAnonStoreyD;
                 // ISSUE: reference to a compiler-generated field
                 selectCAnonStoreyC.node = (MigrateMapSelectNodeUI)((GameObject)Object.Instantiate <GameObject>((M0)((UnityEngine.Component) this._mapSelectNode).get_gameObject(), (Transform)this._scrollRect.get_content(), false)).GetComponent <MigrateMapSelectNodeUI>();
                 // ISSUE: reference to a compiler-generated field
                 selectCAnonStoreyC.id = current.Key;
                 // ISSUE: reference to a compiler-generated field
                 selectCAnonStoreyC.mapName = (string)current.Value.name;
                 // ISSUE: reference to a compiler-generated field
                 // ISSUE: reference to a compiler-generated field
                 selectCAnonStoreyC.node.Text.set_text(selectCAnonStoreyC.mapName);
                 // ISSUE: reference to a compiler-generated field
                 // ISSUE: method pointer
                 ((UnityEvent)selectCAnonStoreyC.node.Button.get_onClick()).AddListener(new UnityAction((object)selectCAnonStoreyC, __methodptr(\u003C\u003Em__0)));
                 // ISSUE: reference to a compiler-generated field
                 ((UnityEngine.Component)selectCAnonStoreyC.node).get_gameObject().SetActiveIfDifferent(true);
                 // ISSUE: reference to a compiler-generated field
                 this._nodes.Add(selectCAnonStoreyC.node);
             }
         }
         // ISSUE: reference to a compiler-generated field
         selectCAnonStoreyD.coroutine = this.OpenMapSelectCoroutine();
     }
     else
     {
         // ISSUE: reference to a compiler-generated field
         selectCAnonStoreyD.coroutine = this.CloseMapSelectCoroutine();
     }
     if (this._fadeMapSelectDisposable != null)
     {
         this._fadeMapSelectDisposable.Dispose();
     }
     // ISSUE: reference to a compiler-generated method
     // ISSUE: reference to a compiler-generated method
     this._fadeMapSelectDisposable = ObservableExtensions.Subscribe <Unit>((IObservable <M0>)Observable.FromCoroutine(new Func <IEnumerator>(selectCAnonStoreyD.\u003C\u003Em__0), false), (System.Action <M0>)(_ => {}), (System.Action <Exception>)(ex => Debug.LogException(ex)), new System.Action(selectCAnonStoreyD.\u003C\u003Em__1));
 }