Exemplo n.º 1
0
    private void GameFSM_SceneInitialized(UserInfo _userInfo)
    {
        base.gameObject.SetActive(true);
        this.currentCityLevel         = CityManager.GetCityLevel() + 1;
        this.cityLevelSlider.value    = (float)this.currentCityLevel;
        this.citylevel.text           = this.currentCityLevel.ToString();
        this.saveGameToggle.isOn      = (!PlayerPrefs.HasKey("EnableSaveGame") || PlayerPrefs.GetInt("EnableSaveGame") == 1);
        this.tutorialtoggle.isOn      = (!PlayerPrefs.HasKey("EnableTutorial") || PlayerPrefs.GetInt("EnableTutorial") == 1);
        DeveloperMenu.SaveGameEnabled = this.saveGameToggle.isOn;
        DeveloperMenu.TutorialEnabled = this.tutorialtoggle.isOn;
        ThumbnailManager.Instance.Initialize();
        foreach (FighterData fighterData in GameFSM.gameData.fighters)
        {
            if (fighterData.type != FighterTypes.HERO)
            {
                this.CreateFighterInfo(fighterData);
            }
        }
        OrbManager.OrbColor value  = (OrbManager.OrbColor) this.orbColor.value;
        OrbManager.OrbSize  value2 = (OrbManager.OrbSize) this.orbSize.value;
        string key = OrbManager.GetKey(value, value2);

        if (GameFSM.gameData.orbs.ContainsKey(key))
        {
            this.orbQuantity.text = GameFSM.gameData.orbs[key].ToString();
        }
        SaveGameManager.Instance.ToggleSaving(true);
        this.fameInputField.text   = GameFSM.userSaveGame.GetUserInfo().GetFame(false).ToString();
        this.cityXPInputField.text = GameFSM.userSaveGame.GetUserInfo().GetXp(false).ToString();
        this.InitializeVipPlayer();
    }
Exemplo n.º 2
0
 void Awake()
 {
     if (instance == null)
     {
         instance = this;
     }
 }
Exemplo n.º 3
0
 void Start()
 {
     manager     = OrbManager.instance;
     timeCreated = Time.time;
     rend        = GetComponent <Renderer>();
     oldColor    = rend.material.GetColor("_Color");
 }
Exemplo n.º 4
0
    // Start is called before the first frame update
    void Start()
    {
        this.audioSource      = GetComponent <AudioSource>();
        this.orbManager       = GameObject.Find("OrbManager").GetComponent <OrbManager>();
        this.emptyWaypoint    = GameObject.Find("EmptyWaypoint").GetComponentInChildren <Transform>();
        this.leverWaypoint    = GameObject.Find("LeverWaypoint").GetComponentInChildren <Transform>();
        this.slot1Waypoint    = GameObject.Find("Slot1Waypoint").GetComponentInChildren <Transform>();
        this.slot2Waypoint    = GameObject.Find("Slot2Waypoint").GetComponentInChildren <Transform>();
        this.slot1OrbWaypoint = GameObject.Find("Slot1OrbWaypoint").GetComponentInChildren <Transform>();
        this.slot2OrbWaypoint = GameObject.Find("Slot2OrbWaypoint").GetComponentInChildren <Transform>();
        this.orbPathWaypoint1 = GameObject.Find("OrbPathWaypoint1").GetComponentInChildren <Transform>();
        this.orbPathWaypoint2 = GameObject.Find("OrbPathWaypoint2").GetComponentInChildren <Transform>();
        this.spawnWaypoint    = GameObject.Find("SpawnWaypoint").GetComponentInChildren <Transform>();

        this.orbPath = new List <Vector3>();
        orbPath.Add(this.orbPathWaypoint1.position);
        orbPath.Add(this.orbPathWaypoint2.position);

        this.drawerSprite = GameObject.Find("SlotMachineDrawer").GetComponentInChildren <SpriteRenderer>();
        this.openSprite   = GameObject.Find("SlotMachineOpen").GetComponentInChildren <SpriteRenderer>();
        this.closedSprite = GameObject.Find("SlotMachineClosed").GetComponentInChildren <SpriteRenderer>();

        this.voido = GameObject.Find("Void").GetComponent <Void>();

        this.state = State.OPEN;
    }
Exemplo n.º 5
0
    public void UseOrb(bool isRed)
    {
        if (!playerCanClick)
        {
            return;
        }

        if (isRed && OrbManager.GetRedCount() < 1)
        {
            return;
        }

        if (!isRed && OrbManager.GetBlueCount() < 1)
        {
            return;
        }


        Vector3 position = RaycastMesh();

        if (position == Vector3.zero)
        {
            return;
        }
        OrbManager.DecrementOrb(isRed);
        GameObject orb = Instantiate(orbG, containerMap);

        orb.transform.position = position + new Vector3(0f, 1f, 0f);
        orb.GetComponent <OrbBehaviour>().StartTicTac(isRed);
    }
    public TutorialManager(CharacterType type, NpcSpawnData spawnData = null, string nickname = "")
    {
        parasitesStillAlive = 0;
        characterSpawner    = type == CharacterType.Parasite ? new CharacterSpawner(Restart) : new CharacterSpawner();
        characterType       = type;
        localName           = nickname;
        SpawnPlayer();
        UiManager.Instance.SetCharacterType(type);
        UiManager.Instance.DeactivateControls();
        triggerZones = GameObject.FindObjectsOfType <TriggerZone>();
        infoScreens  = GameObject.FindObjectsOfType <InfoScreen>();
        detector     = GameObject.FindObjectOfType <NPCInfectionDetector>();

        if (spawnData != null)
        {
            npcManager = new NpcManager(spawnData);
            detector.ScanForNPCs();
        }
        if (type == CharacterType.Parasite)
        {
            // Spawn static orbs
            GameObject orbManagerPrefab = Resources.Load("OrbManager") as GameObject;
            orbManager = GameObject.Instantiate(orbManagerPrefab).GetComponent <OrbManager>();
            new ParasiteTutorialWinCondition();
        }
        else
        {
            new HunterTutorialNpcWinCondition();
        }
        InstantiatePauseOverlay();
        SetPauseOverlayActive(false);
    }
Exemplo n.º 7
0
    // Start is called before the first frame update
    protected virtual void Start()
    {
        this.initialized = true;
        this.stateTimer  = 0f;
        this.velocity    = Vector2.zero;
        this.enflamed    = false;
        this.pen         = FindObjectOfType <Pen>();
        this.gate        = FindObjectOfType <Gate>();
        this.item        = GetComponent <Item>();
        this.renderer    = GetComponentInChildren <SpriteRenderer>();
        this.emotion     = GetComponentInChildren <Emotion>();
        this.shoved      = false;
        this.fightCloud  = null;
        this.fire        = null;
        this.target      = null;
        this.avoid       = null;
        this.state       = State.WANDER;
        this.waypoint    = this.ChooseWaypoint(this.pen);
        this.orbManager  = GameObject.Find("OrbManager").GetComponent <OrbManager>();
        this.main        = GameObject.Find("Main").GetComponent <Main>();
        this.audioSource = GetComponent <AudioSource>();


        if (this.createdFromVoid)
        {
            this.state = State.SPAWNING_FROM_VOID;
            this.transform.localScale = new Vector3(0f, 0f, 1f);
        }

        this.voido = GameObject.Find("Void").GetComponent <Void>();
    }
Exemplo n.º 8
0
 public void pop(Vector3 location)
 {
     temp = stack.Pop();
     if (temp != null)
     {
         temp.deploy(location);
     }
 }
Exemplo n.º 9
0
    public void CollectOrb(PlayerScoring playerScoring)
    {
        int pointValue = playerScoring.AddOrb();

        OrbSFXManager.PlayOrbPickUpSound();
        Destroy(gameObject);
        OrbManager.Place3DText(transform.position, pointValue);
    }
Exemplo n.º 10
0
 public static Vector3 GetGrabableObjectPos(bool onlyOrbs)
 {
     if (onlyOrbs)
     {
         return(OrbManager.GetOrbToGrab((int)W.Range));
     }
     foreach (var minion in ObjectManager.Get <Obj_AI_Minion>().Where(minion => minion.IsValidTarget(W.Range)))
     {
         return(minion.ServerPosition);
     }
     return(OrbManager.GetOrbToGrab((int)W.Range));
 }
Exemplo n.º 11
0
 // Start is called before the first frame update
 void Start()
 {
     this.audioSource  = GetComponent <AudioSource>();
     this.animator     = GetComponentInChildren <Animator>();
     this.camera       = FindObjectOfType <Camera>();
     this.waypoint     = this.transform.position;
     this.machine      = FindObjectOfType <Machine>();
     this.voido        = FindObjectOfType <Void>();
     this.orbManager   = FindObjectOfType <OrbManager>();
     this.storyManager = FindObjectOfType <StoryManager>();
     this.gate         = FindObjectOfType <Gate>();
 }
Exemplo n.º 12
0
    private void CreateContext( )
    {
        context = new Context();
        PlayerManager       playerManager       = new PlayerManager();
        SpellManager        spellManager        = new SpellManager();
        OrbManager          orbManager          = new OrbManager();
        BagManager          bagManager          = new BagManager();
        EnemyManager        enemyManager        = new EnemyManager();
        UIManager           uiManager           = new UIManager();
        AssetManager        assetManager        = new AssetManager();
        StateMachine        stateMachine        = new StateMachine();
        LocalizationManager localizationManager = new LocalizationManager();

        context.AddManagers(assetManager, spellManager, orbManager, bagManager, playerManager, enemyManager, uiManager, stateMachine, localizationManager);   // order matters
        context.SetupManagers();
    }
Exemplo n.º 13
0
    void Start()
    {
        if (instance != null)
        {
            Destroy(this);
        }
        else
        {
            instance = this;
        }


        spawnSpeed = defaultSpawnSpeed;
        orbSpeed   = defaultOrbSpeed;

        GetRouteArea();     //get size of the screen and divide it to four columns
    }
Exemplo n.º 14
0
    IEnumerator StartGame()
    {
        blackScreen.SetActive(true);
        yield return(null);

        yield return(null);

        OrbManager.GetOrbs();

        if (!isTutorial)
        {
            GenerateNewMap();
        }
        else
        {
            StartCoroutine(InstantiateCrowd());
        }
    }
Exemplo n.º 15
0
 public static void UseE(Obj_AI_Base target)
 {
     if (target == null)
     {
         return;
     }
     foreach (var orb in OrbManager.GetOrbs(true).Where(orb => orb.To2D().IsValid() && ObjectManager.Player.Distance(orb, true) < Math.Pow(E.Range, 2)))
     {
         var sp = orb.To2D() + Vector2.Normalize(ObjectManager.Player.ServerPosition.To2D() - orb.To2D()) * 100f;
         var ep = orb.To2D() + Vector2.Normalize(orb.To2D() - ObjectManager.Player.ServerPosition.To2D()) * 592;
         Qe.Delay = E.Delay + ObjectManager.Player.Distance(orb) / E.Speed;
         Qe.UpdateSourcePosition(orb);
         var pPo = Qe.GetPrediction(target).UnitPosition.To2D();
         if (pPo.Distance(sp, ep, true, true) <= Math.Pow(Qe.Width + target.BoundingRadius, 2))
         {
             E.Cast(orb);
         }
     }
 }
Exemplo n.º 16
0
    public void BreakOrb()
    {
        if (this.orbColor == Orb.OrbColor.WHITE)
        {
            // undo the pickupz but keep the ball in place
            this.item.Drop();
            Vector3 removePickupZ = new Vector3(0, this.item.pickupZ, 0);
            this.item.transform.position += removePickupZ;
            for (int i = 0; i < this.childOrbs.Count; i++)
            {
                Orb orb = this.childOrbs[i];
                orb.item.transform.position = this.item.transform.position;
                orb.item.ReturnToLab();
            }
            this.childOrbs.Clear();

            OrbManager om = FindObjectOfType <OrbManager>();
            om.ReturnGhostOrb(this);
        }
    }
 public void End()
 {
     characterSpawner.DestroyCharacter();
     characterSpawner = null;
     npcManager.DespawnNPCs();
     npcManager = null;
     GameObject.Destroy(pauseOverlay);
     // OrbManager is used in the parasite tutorial to manage the static
     //  orbs that are part of the level
     if (orbManager != null)
     {
         orbManager.DestroyOrbs();
         orbManager = null;
     }
     foreach (TriggerZone zone in triggerZones)
     {
         zone.Reset();
     }
     foreach (InfoScreen screen in infoScreens)
     {
         screen.Reset();
     }
 }
Exemplo n.º 18
0
        private static void Game_OnTick(EventArgs args)
        {
            if (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Combo))
            {
                OrbManager.Combo();
            }
            if (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Harass))
            {
                OrbManager.Harass();
            }

            /*if (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.LaneClear))
             * {
             *  OrbManager.WaveClear();
             * }
             * if (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.LastHit))
             * {
             *  OrbManager.LastHit();
             * }*/
            if (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Flee))
            {
                OrbManager.Flee();
            }
        }
Exemplo n.º 19
0
 public void AddRedOrb()
 {
     OrbManager.IncrementOrb(true);
 }
Exemplo n.º 20
0
 void Awake()
 {
     orbPrefab  = orbPref;
     orbManager = this;
 }
Exemplo n.º 21
0
 void DestroyEnemy(int playerNumber)
 {
     OrbManager.PlaceOrbAt(transform.position, playerNumber);
     Destroy(gameObject);
 }
Exemplo n.º 22
0
 public void push(OrbManager orb)
 {
     stack.Push(orb);
 }
Exemplo n.º 23
0
 public void AddBlueOrb()
 {
     OrbManager.IncrementOrb(false);
 }
Exemplo n.º 24
0
    public void RaycastInteractiveElement()
    {
        int layerMask = 1 << 8;


        layerMask = ~layerMask;

        if (!canClick)
        {
            return;
        }

        Ray ray;

#if UNITY_STANDALONE
        ray = cam.ScreenPointToRay(Input.mousePosition);
#else
        ray = cam.ScreenPointToRay(middleScreen);
#endif
        RaycastHit hit;

        if (Physics.Raycast(ray, out hit, 200f, layerMask))
        {
            switch (hit.transform.gameObject.tag)
            {
            case "ToKillAgent":
                if (hit.transform.gameObject.tag.Contains("ToKillAgent"))
                {
                    if (hit.distance < 2.0f)
                    {
                        if (IsSomeoneWatching())
                        {
                            if (gameManager.IsTutorial())
                            {
                                gameManager.ReplacePlayerOnStartPosition();
                            }
                            else
                            {
                                gameManager.CinematicPlayerDie();
                            }
                        }
                        else
                        {
                            if (ProgressionManager.GetWealthValue() > 0.99f)
                            {
                                gameManager.CinematicWinGame();
                            }
                            else
                            {
                                NavMeshAgentManager.Instance().CopsGoOnCrimeScene();
                                gameManager.KillTarget();
                                if (gameManager.IsTutorial())
                                {
                                    TutorialManager.Instance().NextStep();
                                }
                            }
                        }
                    }
                }
                break;

            case "Orb":
                if (hit.transform.parent.CompareTag("Orb"))
                {
                    Destroy(hit.transform.parent.gameObject);
                }
                else
                {
                    Destroy(hit.transform.gameObject);
                }

                OrbManager.IncrementOrb(UnityEngine.Random.Range(0f, 1f) < .5f);
                break;

            case "InteractiveElement":
                Vector3 origin = hit.transform.position;
                Destroy(hit.transform.gameObject);
                break;

            case "TargetRoomDoor":
                if (!gameManager.IsTargetAlive())
                {
                    CodeMission.Instance().OpenMissionPanel();
                }
                break;

            case "LaptopInfo":
                PCMission.Instance().OpenMissionPanel();

                break;

            case "ElevatorDoor":
                if (!gameManager.IsDataRetrieve())
                {
                    return;
                }
                if (gameManager.IsTutorial())
                {
                    if (TutorialManager.Instance().GetStep() == 6)
                    {
                        gameManager.EndTutorial();
                        return;
                    }
                }
                gameManager.GoToNextFloor(hit.transform.parent.gameObject);
                break;
            }
        }
    }
Exemplo n.º 25
0
 // Use this for initialization
 void Start()
 {
     orbManager = GameObject.FindGameObjectWithTag("OrbManager").GetComponent <OrbManager>();
 }
Exemplo n.º 26
0
    private void Awake()
    {
        this.cityLevelSlider.onValueChanged.AddListener(delegate(float arg0)
        {
            this.currentCityLevel = (int)this.cityLevelSlider.value;
            this.citylevel.text   = this.currentCityLevel.ToString();
        });
        this.writeTextWindow = Object.Instantiate <WriteTextWindow>(this.writeTextWindow);
        this.writeTextWindow.transform.SetParent(base.transform, false);
        this.saveGameToggle.onValueChanged.AddListener(delegate(bool arg0)
        {
            DeveloperMenu.SaveGameEnabled = arg0;
            if (arg0)
            {
                PlayerPrefs.SetInt("EnableSaveGame", 1);
                return;
            }
            PlayerPrefs.SetInt("EnableSaveGame", 0);
        });
        this.tutorialtoggle.onValueChanged.AddListener(delegate(bool arg0)
        {
            DeveloperMenu.TutorialEnabled = arg0;
            if (arg0)
            {
                PlayerPrefs.SetInt("EnableTutorial", 1);
                return;
            }
            PlayerPrefs.SetInt("EnableTutorial", 0);
        });
        this.fillResourcesToMax.onClick.AddListener(new UnityAction(this.FillResourcesToMax));
        this.FighterToggle(this.swordButton, FighterTypes.SWORD_SHIELD);
        this.FighterToggle(this.twoHandedButton, FighterTypes.TWO_HANDED);
        this.FighterToggle(this.dualButton, FighterTypes.DUAL_WEAPON);
        this.FighterToggle(this.spearButton, FighterTypes.SPEAR);
        this.pathSelection.options.Clear();
        if (this.mapManager != null)
        {
            MissionPath[] paths = this.mapManager.paths;
            for (int i = 0; i < paths.Length; i++)
            {
                Dropdown.OptionData item = new Dropdown.OptionData(paths[i].id);
                this.pathSelection.options.Add(item);
                this.selectedPath = 0;
            }
        }
        this.pathSelection.value = this.selectedPath;
        this.pathSelection.RefreshShownValue();
        this.RefreshMissionDropdown();
        this.pathSelection.onValueChanged.AddListener(delegate(int arg0)
        {
            this.selectedPath = arg0;
            this.RefreshMissionDropdown();
        });
        this.missionSelection.onValueChanged.AddListener(delegate(int arg0)
        {
            this.selectedMission = arg0;
        });
        this.unlockPaths.onClick.AddListener(delegate()
        {
            if (this.mapManager != null)
            {
                MapManager.UnlockPaths(this.selectedPath, this.selectedMission, this.mapManager, false);
            }
        });
        this.addArmorySlots.onClick.AddListener(delegate()
        {
            GameFSM.gameData.AddArmorySlots(SlotType.Generic, 5);
        });
        this.addRandomWeapons.onClick.AddListener(delegate()
        {
            List <EquipableItemPrefab> allWeaponsAndItems = GFFEquipableItemManager.Instance.GetAllWeaponsAndItems();
            for (int l = 0; l < 5; l++)
            {
                int index = Random.Range(0, allWeaponsAndItems.Count);
                GameFSM.gameData.armory.AddItem(new EquipableItemData(allWeaponsAndItems[index].infoPrefabPath), true);
            }
        });
        this.addOrbsButton.onClick.AddListener(delegate()
        {
            OrbManager.OrbColor value = (OrbManager.OrbColor) this.orbColor.value;
            OrbManager.OrbSize value2 = (OrbManager.OrbSize) this.orbSize.value;
            string key = OrbManager.GetKey(value, value2);
            OrbManager.Instance.Add(key, 1, null);
            this.orbQuantity.text = OrbManager.Instance.GetOrbQuantity(key).ToString();
        });
        this.clearOrbsButton.onClick.AddListener(delegate()
        {
            OrbManager.OrbColor value = (OrbManager.OrbColor) this.orbColor.value;
            OrbManager.OrbSize value2 = (OrbManager.OrbSize) this.orbSize.value;
            string key = OrbManager.GetKey(value, value2);
            OrbManager.Instance.Substract(key, 999999999, null);
            this.orbQuantity.text = OrbManager.Instance.GetOrbQuantity(key).ToString();
        });
        this.orbSize.onValueChanged.AddListener(delegate(int arg0)
        {
            OrbManager.OrbColor value = (OrbManager.OrbColor) this.orbColor.value;
            OrbManager.OrbSize value2 = (OrbManager.OrbSize) this.orbSize.value;
            string key            = OrbManager.GetKey(value, value2);
            this.orbQuantity.text = OrbManager.Instance.GetOrbQuantity(key).ToString();
        });
        this.orbColor.onValueChanged.AddListener(delegate(int arg0)
        {
            OrbManager.OrbColor value = (OrbManager.OrbColor) this.orbColor.value;
            OrbManager.OrbSize value2 = (OrbManager.OrbSize) this.orbSize.value;
            string key            = OrbManager.GetKey(value, value2);
            this.orbQuantity.text = OrbManager.Instance.GetOrbQuantity(key).ToString();
        });
        DeveloperMenu.DeveloperMenuEnabled = true;
        this.addFighterButton.onClick.AddListener(delegate()
        {
            if (this.swordButton.isOn)
            {
                this.AddFighter(FighterTypes.SWORD_SHIELD);
                return;
            }
            if (this.dualButton.isOn)
            {
                this.AddFighter(FighterTypes.DUAL_WEAPON);
                return;
            }
            if (this.spearButton.isOn)
            {
                this.AddFighter(FighterTypes.SPEAR);
                return;
            }
            if (this.twoHandedButton.isOn)
            {
                this.AddFighter(FighterTypes.TWO_HANDED);
            }
        });
        FighterManager.GladiatorClass fighterClass = FighterManager.Instance.GetFighterClass(FighterTypes.SWORD_SHIELD);
        List <string> list = new List <string>();

        foreach (FighterManager.CharacterInfo characterInfo in fighterClass.prefabsCollection)
        {
            list.Add(characterInfo.visualPrefab);
        }
        this.visualAspects.options.Clear();
        this.visualAspects.AddOptions(list);
        this.openAdminDBMenuButton.onClick.AddListener(delegate()
        {
            this.adminDBMenu.Open();
        });
        this.cityNameButton.onClick.AddListener(delegate()
        {
            this.writeTextWindow.Open("Your city name here", "City Name", 60, null, new Text[]
            {
                this.cityName
            });
        });
        this.writeTextWindow.OnWriteNameEnd += delegate(string _newName)
        {
            GameFSM.userSaveGame.GetUserInfo().SetUserName(_newName);
            this.cityName.text = _newName;
            string text = GFFOnlineManager.Instance.UserMaintenanceID;
            if (string.IsNullOrEmpty(text))
            {
                text = GameFSM.userSaveGame.GetUserInfo().GetUserId(false);
            }
            if (!string.IsNullOrEmpty(text))
            {
                GFFOnlineManager.Instance.ChangeUserName(text, _newName, null);
            }
        };
        this.fameInputField.onEndEdit.AddListener(delegate(string arg0)
        {
            GameFSM.userSaveGame.GetUserInfo().OverrideFame(int.Parse(arg0));
        });
        this.cityXPInputField.onEndEdit.AddListener(delegate(string arg0)
        {
            this.ModifyCityLevelByXp(int.Parse(arg0));
        });
        this.dummyBattleButton.onClick.AddListener(delegate()
        {
            this.dummyBattleWindow.Open();
        });
        this.addConsumables.onClick.AddListener(delegate()
        {
            this.consumablesPanel.gameObject.SetActive(true);
            this.consumablesPanel.Open();
        });
        this.pathSelection.onValueChanged.AddListener(delegate(int arg0)
        {
            this.selectedPath = arg0;
            this.RefreshMissionDropdown();
        });
        List <string> list2 = new List <string>();

        for (int k = 0; k < this.tutorialsList.Count; k++)
        {
            list2.Add(this.tutorialsList[k].name);
        }
        this.tutorials.ClearOptions();
        this.tutorials.AddOptions(list2);
        this.tutorials.onValueChanged.AddListener(delegate(int _dropdownIndex)
        {
            this.selectedTutorial = _dropdownIndex;
            this.SetTutorialToggle(this.selectedTutorial);
        });
        this.tutorialConsumed.onValueChanged.AddListener(delegate(bool _consumed)
        {
            this.SetTutorialState(_consumed);
        });
        CrashControl.Instance.debugButtons = this.forceCrashEnable.isOn;
        this.forceCrashEnable.onValueChanged.AddListener(delegate(bool enabled)
        {
            CrashControl.Instance.debugButtons = enabled;
        });
        this.consumeAllTutorials.onClick.AddListener(delegate()
        {
            this.ConsumeAllTutorials();
        });
        this.restartAllTutorials.onClick.AddListener(delegate()
        {
            this.RestarAllTutorials();
        });
        this.resetPendingSkills.onClick.AddListener(delegate()
        {
            this.ResetPendingSkillPoints();
        });
        this.reconfigureCityXP.onClick.AddListener(delegate()
        {
            this.ReconfigureCityXP();
        });
        if (GameFSM.Instance.IsInitializationDone)
        {
            this.GameFSM_SceneInitialized(GameFSM.userSaveGame.GetUserInfo());
        }
        else
        {
            GameFSM.SceneInitialized += this.GameFSM_SceneInitialized;
            base.gameObject.SetActive(false);
        }
        this.videoMode.onClick.AddListener(delegate()
        {
            DeveloperMenu.VideoMode            = true;
            DeveloperMenu.DeveloperMenuEnabled = false;
            this.ToSplash();
        });
        this.regenerateChallenges.onClick.AddListener(delegate()
        {
            GameProgress.CampaignProgress campaignProgress = GameFSM.gameData.progress.GetCampaignProgress(MapManager.DEFAULT_CAMPAIGN_ID);
            if (campaignProgress != null)
            {
                campaignProgress.randonMatchs.Clear();
                campaignProgress.generateRandomMatchsDate = DateTime.MinValue;
            }
        });
        this.healAllGladsButton.onClick.AddListener(delegate()
        {
            this.MaxHealthToAllTheGlads();
        });
        this.trainingAllGladsButton.onClick.AddListener(delegate()
        {
            this.MaxTrainingToAllTheGlads();
        });
        this.addOneMonthVipPlayer.onClick.AddListener(delegate()
        {
            this.OnAddOneMonthVipPlayerClicked();
        });
        this.timersResetButton.onClick.AddListener(delegate()
        {
            foreach (KeyValuePair <string, Task <TaskTypes> > keyValuePair in GameFSM.gameData.taskSaveGame.activeTasks)
            {
                if (keyValuePair.Value.type == TaskTypes.PRODUCTION)
                {
                    keyValuePair.Value.status = Status.CANCELLED;
                }
            }
            GameFSM.gameData.merchantChestOpeningTime = new Dictionary <string, DateTime>();
            if (GameFSM.gameData.progress != null)
            {
                GameFSM.gameData.progress.GetCampaignProgress(MapManager.DEFAULT_CAMPAIGN_ID).generateRandomMatchsDate = DateTime.MinValue;
                GameFSM.gameData.progress.GetCampaignProgress(MapManager.DEFAULT_CAMPAIGN_ID).lastPicked = DateTime.MinValue;
            }
            GameFSM.gameData.clanDonationsBonuses.Clear();
            this.ConfirmationMessage("Todos los Timers Reseteados");
        });
        this.newPayments.onClick.AddListener(delegate()
        {
            this.newPaymentsPanel.Open();
        });
        this.HeroesBtn.onClick.AddListener(delegate()
        {
            this.heroesPanel.Initialize();
        });
        this.cityObstaclesButton.onClick.AddListener(new UnityAction(this.CityObstaclesClicked));
        this.ClanLevelForced(this.forceLevelCheck.isOn);
        this.ClanLevelToForce(this.clanLevelSlider.value);
        this.forceLevelCheck.onValueChanged.AddListener(new UnityAction <bool>(this.ClanLevelForced));
        this.clanLevelSlider.onValueChanged.AddListener(new UnityAction <float>(this.ClanLevelToForce));
    }