Пример #1
0
        protected override void OnAwake(PlayerActor player)
        {
            this.minimapUI = Singleton <MapUIContainer> .Instance.MinimapUI;
            this.input     = Singleton <Input> .Instance;
            this.dt        = 0.0f;
            this.minimapUI.OpenAllMap(this.minimapUI.VisibleMode);
            Singleton <MapUIContainer> .Instance.MinimapUI.VisibleMode = 1;
            MapUIContainer.SetCommandLabelAcception(CommandLabel.AcceptionState.None);
            Singleton <Input> .Instance.ReserveState(Input.ValidType.UI);

            Singleton <Input> .Instance.SetupState();

            this.minimapUI.FromHomeMenu = false;
            Singleton <MapUIContainer> .Instance.MinimapUI.WarpProc = (MiniMapControler.OnWarp)(x =>
            {
                Singleton <MapUIContainer> .Instance.MinimapUI.AllMapClosedAction = (Action)(() => {});
                string prevStateName = player.PlayerController.PrevStateName;
                Singleton <Manager.Map> .Instance.WarpToBasePoint(x, (Action)(() =>
                {
                    if (prevStateName == "Onbu")
                    {
                        player.Controller.ChangeState("Onbu");
                    }
                    else
                    {
                        player.Controller.ChangeState("Normal");
                    }
                    player.Controller.ChangeState("Idle");
                    GC.Collect();
                    if (this.minimapUI.prevVisibleMode != 0 || !Manager.Config.GameData.MiniMap)
                    {
                        return;
                    }
                    this.minimapUI.OpenMiniMap();
                }), (Action)(() =>
                {
                    if (prevStateName == "Onbu")
                    {
                        player.Controller.ChangeState("Onbu");
                    }
                    else
                    {
                        player.Controller.ChangeState("Normal");
                    }
                    Singleton <Input> .Instance.ReserveState(Input.ValidType.Action);
                    Singleton <Input> .Instance.SetupState();
                    Singleton <Manager.Map> .Instance.Player.SetScheduledInteractionState(true);
                    Singleton <Manager.Map> .Instance.Player.ReleaseInteraction();
                }));
                Singleton <MapUIContainer> .Instance.MinimapUI.WarpProc = (MiniMapControler.OnWarp)null;
            });
            ActorAnimInfo animInfo = player.Animation.AnimInfo;

            animInfo.outEnableBlend   = true;
            animInfo.outBlendSec      = 0.0f;
            player.Animation.AnimInfo = animInfo;
        }
Пример #2
0
        static void MiniMapControllerUpdatePostfix(MiniMapControler __instance, bool ___endInit)
        {
            if (__instance == null || !___endInit)
            {
                return;
            }

            UIOptimizations.UpdateMiniMapTimer(__instance.VisibleMode, _miniMapMaxFPS.Value);
        }
Пример #3
0
        public void Init(MiniMapControler miniMap, GameObject allCamera)
        {
            this.Input            = Singleton <Input> .Instance;
            this.miniMapcontroler = miniMap;
            this.allMapcontroler  = allCamera;
            AssetBundleInfo assetBundleInfo;

            if (Singleton <Resources> .Instance.Map.MapList.TryGetValue(Singleton <Manager.Map> .Instance.MapID, out assetBundleInfo))
            {
                this.IslandName.set_text((string)assetBundleInfo.name);
            }
            else
            {
                this.IslandName.set_text("廃墟の島");
            }
            this.SetSelectGirlList();
            this.RefreshWarpPointNode();
            ((UnityEventBase)this.WorldMap.get_onClick()).RemoveAllListeners();
            Button.ButtonClickedEvent onClick = this.WorldMap.get_onClick();
            // ISSUE: reference to a compiler-generated field
            if (AllAreaMapUI.\u003C\u003Ef__am\u0024cache0 == null)
            {
                // ISSUE: reference to a compiler-generated field
                // ISSUE: method pointer
                AllAreaMapUI.\u003C\u003Ef__am\u0024cache0 = new UnityAction((object)null, __methodptr(\u003CInit\u003Em__0));
            }
            // ISSUE: reference to a compiler-generated field
            UnityAction fAmCache0 = AllAreaMapUI.\u003C\u003Ef__am\u0024cache0;

            ((UnityEvent)onClick).AddListener(fAmCache0);
            DefinePack.AssetBundleManifestsDefine abManifests = Singleton <Resources> .Instance.DefinePack.ABManifests;
            if (Object.op_Equality((Object)this.Guid[0], (Object)null))
            {
                this.Guid[0] = (GameObject)Object.Instantiate <GameObject>((M0)this.PlayGuideNode);
                this.Guid[0].get_transform().SetParent(this.PlayGuideList.get_transform(), false);
                this.Guid[0].get_transform().set_localScale(this.LocalScaleDef);
                ((Image)this.Guid[0].GetComponentInChildren <Image>()).set_sprite(Singleton <Resources> .Instance.itemIconTables.InputIconTable[2]);
                ((Text)this.Guid[0].GetComponentInChildren <Text>()).set_text("拡大・縮小");
                this.Guid[0].get_gameObject().SetActive(true);
            }
            if (Object.op_Equality((Object)this.Guid[1], (Object)null))
            {
                this.Guid[1] = (GameObject)Object.Instantiate <GameObject>((M0)this.PlayGuideNode);
                this.Guid[1].get_transform().SetParent(this.PlayGuideList.get_transform(), false);
                this.Guid[1].get_transform().set_localScale(this.LocalScaleDef);
                ((Image)this.Guid[1].GetComponentInChildren <Image>()).set_sprite(Singleton <Resources> .Instance.itemIconTables.InputIconTable[0]);
                ((Text)this.Guid[1].GetComponentInChildren <Text>()).set_text("決定");
                this.Guid[1].get_gameObject().SetActive(true);
            }
            if (Object.op_Equality((Object)this.Guid[2], (Object)null))
            {
                this.Guid[2] = (GameObject)Object.Instantiate <GameObject>((M0)this.PlayGuideNode);
                this.Guid[2].get_transform().SetParent(this.PlayGuideList.get_transform(), false);
                this.Guid[2].get_transform().set_localScale(this.LocalScaleDef);
                ((Image)this.Guid[2].GetComponentInChildren <Image>()).set_sprite(Singleton <Resources> .Instance.itemIconTables.InputIconTable[1]);
                ((Text)this.Guid[2].GetComponentInChildren <Text>()).set_text("マップを閉じる");
                this.Guid[2].get_gameObject().SetActive(true);
            }
            ((Component)this.WorldMap).get_gameObject().SetActive(false);
            this.mapAction.Init();
            this.warpListUI.DisposeWarpListUI();
            this.warpListUI.Init();
            this.ActionFilter.Init(miniMap, this);
        }
 public void Init(MiniMapControler miniMapCtrl, AllAreaMapUI _allAreaMapUI)
 {
     // ISSUE: object of a compiler-generated type is created
     // ISSUE: variable of a compiler-generated type
     AllAreaMapActionFilter.\u003CInit\u003Ec__AnonStorey0 initCAnonStorey0 = new AllAreaMapActionFilter.\u003CInit\u003Ec__AnonStorey0();
     // ISSUE: reference to a compiler-generated field
     initCAnonStorey0.miniMapCtrl = miniMapCtrl;
     // ISSUE: reference to a compiler-generated field
     initCAnonStorey0.\u0024this = this;
     this.CanH = Game.isAdd01;
     ((Component)this.HToggle).get_gameObject().SetActive(this.CanH);
     // ISSUE: reference to a compiler-generated field
     this.miniMapcontroler = initCAnonStorey0.miniMapCtrl;
     this.AllAreaMapUI     = _allAreaMapUI;
     ((UnityEventBase)this.ActionCategoryShow.get_onClick()).RemoveAllListeners();
     // ISSUE: method pointer
     ((UnityEvent)this.ActionCategoryShow.get_onClick()).AddListener(new UnityAction((object)initCAnonStorey0, __methodptr(\u003C\u003Em__0)));
     // ISSUE: reference to a compiler-generated method
     // ISSUE: reference to a compiler-generated method
     ObservableExtensions.Subscribe <long>(Observable.Where <long>(Observable.TakeUntilDestroy <long>((IObservable <M0>)Observable.EveryUpdate(), ((Component)this).get_gameObject()), (Func <M0, bool>) new Func <long, bool>(initCAnonStorey0.\u003C\u003Em__1)), (Action <M0>) new Action <long>(initCAnonStorey0.\u003C\u003Em__2));
     for (int index = 0; index < this._ActionToggles.Length; ++index)
     {
         // ISSUE: object of a compiler-generated type is created
         // ISSUE: variable of a compiler-generated type
         AllAreaMapActionFilter.\u003CInit\u003Ec__AnonStorey1 initCAnonStorey1 = new AllAreaMapActionFilter.\u003CInit\u003Ec__AnonStorey1();
         // ISSUE: reference to a compiler-generated field
         initCAnonStorey1.\u003C\u003Ef__ref\u00240 = initCAnonStorey0;
         // ISSUE: reference to a compiler-generated field
         initCAnonStorey1.id = index;
         // ISSUE: reference to a compiler-generated field
         Image component = (Image)((Component)this._ActionToggles[initCAnonStorey1.id]).GetComponent <Image>();
         // ISSUE: reference to a compiler-generated field
         if (initCAnonStorey1.id == 0)
         {
             Resources.ItemIconTables.SetIcon(Resources.ItemIconTables.IconCategory.Category, 0, component, true);
             // ISSUE: reference to a compiler-generated field
             ((UnityEventBase)this._ActionToggles[initCAnonStorey1.id].onValueChanged).RemoveAllListeners();
             // ISSUE: reference to a compiler-generated field
             // ISSUE: method pointer
             ((UnityEvent <bool>) this._ActionToggles[initCAnonStorey1.id].onValueChanged).AddListener(new UnityAction <bool>((object)initCAnonStorey1, __methodptr(\u003C\u003Em__0)));
         }
         else
         {
             int id = -1;
             // ISSUE: reference to a compiler-generated field
             if (this.IDContain(initCAnonStorey1.id, ref id))
             {
                 if (this.IconIDs[id].Category == 0)
                 {
                     Resources.ItemIconTables.SetIcon(Resources.ItemIconTables.IconCategory.Category, this.IconIDs[id].IconID, component, true);
                 }
                 else if (this.IconIDs[id].Category == 1)
                 {
                     Sprite sprite = component.get_sprite();
                     Singleton <Resources> .Instance.itemIconTables.ActionIconTable.TryGetValue(this.IconIDs[id].IconID, out sprite);
                 }
             }
             // ISSUE: reference to a compiler-generated field
             ((UnityEventBase)this._ActionToggles[initCAnonStorey1.id].onValueChanged).RemoveAllListeners();
             // ISSUE: reference to a compiler-generated field
             // ISSUE: method pointer
             ((UnityEvent <bool>) this._ActionToggles[initCAnonStorey1.id].onValueChanged).AddListener(new UnityAction <bool>((object)initCAnonStorey1, __methodptr(\u003C\u003Em__1)));
         }
     }
 }