コード例 #1
0
ファイル: mgfirescript.cs プロジェクト: SassyEX/Morbus
 public void ir_al_mapa()
 {
     felicidades.SetActive(false);
     panel.SetActive(true);
     LoadScene.sceneToLoad = "Mapajuego";
     LoadPanel.SetActive(true);
 }
コード例 #2
0
    IEnumerator CNextPhase()
    {
        if (SoundManager.Instance != null)
        {
            SoundManager.Instance.Play_ButtonClick();
        }
        //BlockClicks.Instance.SetBlockAll(true);

        SC_paintedTex.texture      = paintEngine.tex;
        SC_imgFortuneMessage.color = imgFortuneMessage.color;

        foreach (Transform t in stickers.StickersHolder)
        {
            Debug.Log(t.name);
            GameObject go = GameObject.Instantiate(t.gameObject, SC_StickersHolder);
            go.transform.localScale    = t.localScale;
            go.transform.localPosition = t.localPosition;
            go.transform.localRotation = t.localRotation;
        }


        transform.GetComponent <CaptureImage>().ScreenshotFortuneCookiesMessage();

        yield return(new WaitForSeconds(.1f));

        if (LoadPanel != null /*/*&& SDKManager.Instance.IsCanShowAd*/)
        {
            LoadPanel.SetActive(true);
        }
        else
        {
            SceneManager.LoadScene("BakeFortuneCookies");
        }
    }
コード例 #3
0
        private IEnumerator LoadSceneAsynUseLoadingBarCoroutine(string name)
        {
            AsyncOperation asyncOperation = SceneManager.LoadSceneAsync(name);

            asyncOperation.allowSceneActivation = false;

            LoadPanel panel    = GameObject.Find("loading").GetComponent <LoadPanel>();
            Image     prograss = panel.GetControl <Image>("progress");
            Text      word     = panel.GetControl <Text>("Text");

            while (!asyncOperation.isDone)
            {
                word.text           = string.Format("{0:F}%", asyncOperation.progress * 100);
                prograss.fillAmount = asyncOperation.progress;
                if (asyncOperation.progress >= 0.9f)
                {
                    word.text           = "按下“空格键”继续";
                    prograss.fillAmount = 1.0f;
                    if (Input.GetKeyDown(KeyCode.Space))
                    {
                        asyncOperation.allowSceneActivation = true;
                    }
                }
                yield return(null);
            }
        }
コード例 #4
0
ファイル: Actions.cs プロジェクト: SassyEX/Morbus
 public void Finish()
 {
     if (status.text == "Lastima..")
     {
         variables_indestructibles.monedas[0] = (Int32.Parse(variables_indestructibles.monedas[0]) + reward.RewardF[selected.idBoss - 1, 0]).ToString();
         variables_indestructibles.bismuto    = (Int32.Parse(variables_indestructibles.bismuto) + reward.RewardF[selected.idBoss - 1, 1]).ToString();
         arcrew.guardar_variables();
     }
     if (status.text == "¡Felicidades!")
     {
         variables_indestructibles.monedas[0] = (Int32.Parse(variables_indestructibles.monedas[0]) + reward.Reward[selected.idBoss - 1, 0]).ToString();
         variables_indestructibles.bismuto    = (Int32.Parse(variables_indestructibles.bismuto) + reward.Reward[selected.idBoss - 1, 1]).ToString();
         if (Int32.Parse(variables_indestructibles.nivel_organismo_jefes) == 16)
         {
             variables_indestructibles.Arenas = "true";
         }
         else
         {
             variables_indestructibles.nivel_organismo_jefes = (Int32.Parse(variables_indestructibles.nivel_organismo_jefes) + 1).ToString();
         }
         variables_indestructibles.experiencia = (Int32.Parse(variables_indestructibles.experiencia) + reward.Rewardxp[selected.idBoss - 1]).ToString();
         arcrew.guardar_variables();
     }
     Destroy(GameObject.Find("Reference"));
     LoadScene.sceneToLoad = "Mapajuego";
     LoadPanel.SetActive(true);
 }
コード例 #5
0
ファイル: Santuario_op.cs プロジェクト: SassyEX/Morbus
 public void voler()
 {
     if (startTime != 1)
     {
         LoadScene.sceneToLoad = "Mapajuego";
         LoadPanel.SetActive(true);
     }
 }
コード例 #6
0
    /// <summary>
    /// 状态一开始调用
    /// </summary>
    public override void StateBegin()
    {
        loadPanel = new LoadPanel();
        loadPanel.Begin();

        if (loadPanel != null)
        {
            loadPanel.SetNextSceneState(m_NextSceneName, m_sceneType, m_speed);
        }
    }
コード例 #7
0
    public void SetNull(int index, LoadPanel panel)
    {
        countText.text      = index.ToString();
        lvlText.text        = "-";
        essenceText.text    = "-";
        timePlayedText.text = "-H -M";
        button.onClick.RemoveAllListeners();

        transform.Find("Button").GetComponent <ProfileSlotOnSelect>().Set(-1, panel);
    }
コード例 #8
0
    public void Set(int index, SaveProfile profile, LoadPanel panel)
    {
        this.loadPanel      = panel;
        this.index          = index;
        countText.text      = index.ToString();
        lvlText.text        = profile.lvl.ToString();
        essenceText.text    = profile.essence.ToString();
        timePlayedText.text = GetFormattedTime(profile.timePlayed);
        button.onClick.RemoveAllListeners();
        button.onClick.AddListener(() => panel.LoadSlot(profile));

        transform.Find("Button").GetComponent <ProfileSlotOnSelect>().Set(index, panel);
    }
コード例 #9
0
    void OnEnable()
    {
        string folder  = Application.persistentDataPath + "/SavedGames";
        string savelog = Application.persistentDataPath + "/SavedGames/savelog.xml";

        if (!Directory.Exists(folder))
        {
            Directory.CreateDirectory(folder);
        }
        if (!File.Exists(savelog))
        {
            //File.Create (savelog);
            using (var fs = new FileStream(savelog, FileMode.OpenOrCreate, FileAccess.Write, FileShare.ReadWrite))
            {
                var newText = Encoding.UTF8.GetBytes("<xml>\n</xml>");
                fs.Write(newText, 0, newText.Length);
                fs.Close();
            }
        }
        XmlDocument doc = new XmlDocument();

        //doc.LoadXml ("<xml><save><name>first</name><timestamp></timestamp><file>"+name+".gm</file></save><save><name>first</name><timestamp>"+System.DateTime.Now.ToString()+"</timestamp><file>"+name+"2.gm</file></save></xml>");
        doc.Load(savelog);
        List <LoadPanel> Loads = new List <LoadPanel>();

        foreach (XmlNode node in doc.DocumentElement.ChildNodes)
        {
            LoadPanel New = new LoadPanel(node.ChildNodes[0].InnerText, node.ChildNodes[2].InnerText, node.ChildNodes[1].InnerText);
            Loads.Add(New);
        }
        //screen.GetComponent<Image> ().sprite = Loads [0].img;

        int temp = Loads.Count - 1;

        for (int i = temp; i >= 0; i--)
        {
            GameObject temporary = GameObject.Instantiate(prefab, content.transform);
            temporary.transform.GetChild(0).GetComponent <Text> ().text = Loads [i].time;
            string nn  = Loads [i].name;
            Sprite spr = Loads [i].img;
            temporary.GetComponent <Button>().onClick.AddListener(() => ChooseLoad(nn, spr));
        }
    }
コード例 #10
0
        public void Btn_Login_Select_Admins_Click(object sender, EventArgs e)
        {
            da = new OleDbDataAdapter("select * from Administrators where User_Name='" + Txt_LogIn_UserName.Text + "'and Password='******'", con);
            da.Fill(dt);
            if (dt.Rows.Count <= 0)
            {
                LBL_LogIn_Status.Text = "User Name or Password are Invalid, Please Try Again ! ";
            }
            else if (dt.Rows.Count > 0)
            {
                LBL_LogIn_Status.Text = "Logged In Successfully";
                this.Hide();
                Implement i = new Implement();
                i.Show();
            }
            LoadPanel l = new LoadPanel();

            if (Txt_LogIn_UserName.Text == "*****@*****.**" && Txt_LogIn_Password.Text == "123abc")
            {
            }
        }
コード例 #11
0
ファイル: Game.cs プロジェクト: EttienneS/karthus
 internal void ShowLoadPanel()
 {
     CurrentLoadPanel = Instantiate(LoadPanelPrefab, UI.transform);
 }
コード例 #12
0
 public void Back()
 {
     LoadScene.sceneToLoad = "Mapajuego";
     LoadPanel.SetActive(true);
 }
コード例 #13
0
 private void Awake()
 {
     load = transform.GetChild(0).GetComponent <LoadPanel>();
 }
コード例 #14
0
        /// <summary>
        /// Загрузка контента (вызывается после Initialize())
        /// </summary>
        protected override void LoadContent()
        {
            backgroundFont = Content.Load <SpriteFont>(Fnames.OldEnglishTextMT);
            bFont          = Content.Load <SpriteFont>(Fnames.ButtonFont);

            #region Buttons

            int start = 300;
            int step  = (cfg.ResolutionHeight == 600) ? 65 : 50;
            int count = 0;

            Button Continue = new Button(MultiSprite.CreateSprite(Content, spriteBatch, Fnames.ContinueB, new Vector2(Window.ClientBounds.Width / 2f - 122, Window.ClientBounds.Height / 1000f * (start + step * count++)), new Vector2(244, 36), Vector2.One),
                                         CreateSound3D(Content, Fnames.UIButtonClick),
                                         CreateSound3D(Content, Fnames.UIButtonSelect),
                                         bFont);
            Button New = new Button(MultiSprite.CreateSprite(Content, spriteBatch, Fnames.NewB, new Vector2(Window.ClientBounds.Width / 2f - 122, Window.ClientBounds.Height / 1000f * (start + step * count++)), new Vector2(244, 36), Vector2.One),
                                    CreateSound3D(Content, Fnames.UIButtonClick),
                                    CreateSound3D(Content, Fnames.UIButtonSelect),
                                    bFont);
            Button Save = new Button(MultiSprite.CreateSprite(Content, spriteBatch, Fnames.SaveB, new Vector2(Window.ClientBounds.Width / 2f - 122, Window.ClientBounds.Height / 1000f * (start + step * count++)), new Vector2(244, 36), Vector2.One),
                                     CreateSound3D(Content, Fnames.UIButtonClick),
                                     CreateSound3D(Content, Fnames.UIButtonSelect),
                                     bFont);
            Button Load = new Button(MultiSprite.CreateSprite(Content, spriteBatch, Fnames.LoadB, new Vector2(Window.ClientBounds.Width / 2f - 122, Window.ClientBounds.Height / 1000f * (start + step * count++)), new Vector2(244, 36), Vector2.One),
                                     CreateSound3D(Content, Fnames.UIButtonClick),
                                     CreateSound3D(Content, Fnames.UIButtonSelect),
                                     bFont);
            Button Options = new Button(MultiSprite.CreateSprite(Content, spriteBatch, Fnames.OptionsB, new Vector2(Window.ClientBounds.Width / 2f - 122, Window.ClientBounds.Height / 1000f * (start + step * count++)), new Vector2(244, 36), Vector2.One),
                                        CreateSound3D(Content, Fnames.UIButtonClick),
                                        CreateSound3D(Content, Fnames.UIButtonSelect),
                                        bFont);
            Button Credits = new Button(MultiSprite.CreateSprite(Content, spriteBatch, Fnames.CreditsB, new Vector2(Window.ClientBounds.Width / 2f - 122, Window.ClientBounds.Height / 1000f * (start + step * count++)), new Vector2(244, 36), Vector2.One),
                                        CreateSound3D(Content, Fnames.UIButtonClick),
                                        CreateSound3D(Content, Fnames.UIButtonSelect),
                                        bFont);
            Button Exit = new Button(MultiSprite.CreateSprite(Content, spriteBatch, Fnames.ExitGlobalB, new Vector2(Window.ClientBounds.Width / 2f - 122, Window.ClientBounds.Height / 1000f * (start + step * count++)), new Vector2(244, 36), Vector2.One),
                                     CreateSound3D(Content, Fnames.UIButtonClick),
                                     CreateSound3D(Content, Fnames.UIButtonSelect),
                                     bFont);
            Continue.Text          = "";
            Continue.Click        += new EventHandler <MouseElementEventArgs>(Continue_Click);
            Continue.MouseMove    += new EventHandler <MouseElementEventArgs>(Button_MouseMove);
            Continue.MouseMoveOut += new EventHandler <MouseElementEventArgs>(Button_MouseMoveOut);
            Continue.Visible       = isContinue = false;
            continueB              = Continue;

            New.Text          = "";
            New.Click        += new EventHandler <MouseElementEventArgs>(New_Click);
            New.MouseMove    += new EventHandler <MouseElementEventArgs>(Button_MouseMove);
            New.MouseMoveOut += new EventHandler <MouseElementEventArgs>(Button_MouseMoveOut);

            Save.Text          = "";
            Save.Click        += new EventHandler <MouseElementEventArgs>(Save_Click);
            Save.MouseMove    += new EventHandler <MouseElementEventArgs>(Button_MouseMove);
            Save.MouseMoveOut += new EventHandler <MouseElementEventArgs>(Button_MouseMoveOut);

            Load.Text          = "";
            Load.Click        += new EventHandler <MouseElementEventArgs>(Load_Click);
            Load.MouseMove    += new EventHandler <MouseElementEventArgs>(Button_MouseMove);
            Load.MouseMoveOut += new EventHandler <MouseElementEventArgs>(Button_MouseMoveOut);

            Options.Text          = "";
            Options.Click        += new EventHandler <MouseElementEventArgs>(Options_Click);
            Options.MouseMove    += new EventHandler <MouseElementEventArgs>(Button_MouseMove);
            Options.MouseMoveOut += new EventHandler <MouseElementEventArgs>(Button_MouseMoveOut);

            Credits.Text          = "";
            Credits.Click        += new EventHandler <MouseElementEventArgs>(Credits_Click);
            Credits.MouseMove    += new EventHandler <MouseElementEventArgs>(Button_MouseMove);
            Credits.MouseMoveOut += new EventHandler <MouseElementEventArgs>(Button_MouseMoveOut);

            Exit.Text          = "";
            Exit.Click        += new EventHandler <MouseElementEventArgs>(Exit_Click);
            Exit.MouseMove    += new EventHandler <MouseElementEventArgs>(Button_MouseMove);
            Exit.MouseMoveOut += new EventHandler <MouseElementEventArgs>(Button_MouseMoveOut);

            buttons.Add(Continue);
            buttons.Add(New);
            buttons.Add(Save);
            buttons.Add(Load);
            buttons.Add(Options);
            buttons.Add(Credits);
            buttons.Add(Exit);

            #endregion

            #region Panels

            string text = "Do you really want to exit?";
            exitApplyPanel              = new ApplyPanel(this, Content, Sprite.CreateSprite(Content, Fnames.Panel, new Vector2(Window.ClientBounds.Width / 3f, Window.ClientBounds.Height / 3f), new Vector2(780 * (float)Window.ClientBounds.Width / 1280f / 2f, 640 * (float)Window.ClientBounds.Height / 1024f / 3f)), text);
            exitApplyPanel.ApplyAction += new Action(() => Game.Exit());
            exitApplyPanel.ExitAction  += new Action(() => exitApplyPanel.Visible = false);
            exitApplyPanel.Enabled     += new EventHandler <EventArgs>(panel_Enabled);
            exitApplyPanel.Disabled    += new EventHandler <EventArgs>(panel_Disabled);

            optionsPanel              = new OptionsPanel(this, Content, Sprite.CreateSprite(Content, Fnames.Panel, new Vector2(Window.ClientBounds.Width / 5.2f, Window.ClientBounds.Height / 6.8f), new Vector2(780 * (float)Window.ClientBounds.Width / 1280f, 640 * (float)Window.ClientBounds.Height / 1024f)), settings);
            optionsPanel.Enabled     += new EventHandler <EventArgs>(panel_Enabled);
            optionsPanel.Disabled    += new EventHandler <EventArgs>(panel_Disabled);
            optionsPanel.Disabled    += new EventHandler <EventArgs>((object sender, EventArgs e) => settings = (Settings)optionsPanel.ApplyedSettings.Clone());
            optionsPanel.ApplyAction += new Action(() => { if (optionsPanel.ApplyedSettings.MusicIsMuted)
                                                           {
                                                               player.Stop();
                                                           }
                                                           else
                                                           {
                                                               player.Start();
                                                           } });

            text                   = String.Format("{0}\n{1}\n{2}", "Credits: ", "1) Bolshakov Kirill", "http://vk.com/overlordff");
            creditsPanel           = new CreditsPanel(this, Content, Sprite.CreateSprite(Content, Fnames.Panel, new Vector2(Window.ClientBounds.Width / 5.2f, Window.ClientBounds.Height / 6.8f), new Vector2(780 * (float)Window.ClientBounds.Width / 1280f, 640 * (float)Window.ClientBounds.Height / 1024f)), text);
            creditsPanel.Enabled  += new EventHandler <EventArgs>(panel_Enabled);
            creditsPanel.Disabled += new EventHandler <EventArgs>(panel_Disabled);

            savePanel           = new SavePanel(this, Content, Sprite.CreateSprite(Content, Fnames.Panel, new Vector2(Window.ClientBounds.Width / 5.2f, Window.ClientBounds.Height / 6.8f), new Vector2(780 * (float)Window.ClientBounds.Width / 1280f, 640 * (float)Window.ClientBounds.Height / 1024f)));
            savePanel.Enabled  += new EventHandler <EventArgs>(panel_Enabled);
            savePanel.Disabled += new EventHandler <EventArgs>(panel_Disabled);

            loadPanel           = new LoadPanel(this, Content, Sprite.CreateSprite(Content, Fnames.Panel, new Vector2(Window.ClientBounds.Width / 5.2f, Window.ClientBounds.Height / 6.8f), new Vector2(780 * (float)Window.ClientBounds.Width / 1280f, 640 * (float)Window.ClientBounds.Height / 1024f)));
            loadPanel.Enabled  += new EventHandler <EventArgs>(panel_Enabled);
            loadPanel.Disabled += new EventHandler <EventArgs>(panel_Disabled);

            #endregion

            Song deathSong = Content.Load <Song>(Fnames.DeathSong);
            Song epicScore = Content.Load <Song>(Fnames.EpicScore);

            if (random.NextDouble() >= 0.5)
            {
                background = Content.Load <Texture2D>(Fnames.BackgroundSword);
                player.Add(deathSong);
                optionsPanel.Color   = new Color(70, 70, 255);
                creditsPanel.Color   = new Color(70, 70, 255);
                exitApplyPanel.Color = new Color(70, 70, 255);
                savePanel.Color      = new Color(70, 70, 255);
                loadPanel.Color      = new Color(70, 70, 255);
            }
            else
            {
                background = Content.Load <Texture2D>(Fnames.BackgroundKnight);
                player.Add(epicScore);
                optionsPanel.Color   = new Color(174, 160, 75);
                creditsPanel.Color   = new Color(174, 160, 75);
                exitApplyPanel.Color = new Color(174, 160, 75);
                savePanel.Color      = new Color(174, 160, 75);
                loadPanel.Color      = new Color(174, 160, 75);
            }

            Game.Components.Clear();
            Game.Components.Add(new FPS(Game, Fnames.Arial14, new Vector2(Window.ClientBounds.Width / 2f - 25, 0)));
            Game.Components.Add(new GameCursor(Game, Fnames.Cursor));

            Components.Add(exitApplyPanel);
            Components.Add(optionsPanel);
            Components.Add(creditsPanel);
            Components.Add(savePanel);
            Components.Add(loadPanel);
            Components.AddRange(buttons);

            if (!cfg.MusicIsMuted)
            {
                player.Start();
            }
        }
コード例 #15
0
 public void Start()
 {
     lp   = GameObject.Find("LoadPanel").GetComponent <LoadPanel>();
     name = transform.Find("Text").GetComponent <Text>();
     img  = GetComponent <Image>();
 }
コード例 #16
0
 public void Set(int index, LoadPanel panel)
 {
     loadPanel  = panel;
     this.index = index;
 }