Пример #1
0
        void ReleaseDesignerOutlets()
        {
            if (ButtonPause != null)
            {
                ButtonPause.Dispose();
                ButtonPause = null;
            }

            if (LabelTime != null)
            {
                LabelTime.Dispose();
                LabelTime = null;
            }

            if (ScrollViewGame != null)
            {
                ScrollViewGame.Dispose();
                ScrollViewGame = null;
            }

            if (ButtonDebug != null)
            {
                ButtonDebug.Dispose();
                ButtonDebug = null;
            }
        }
Пример #2
0
 private void Awake()
 {
     if (instancePause != null)
     {
         return;
     }
     instancePause = this;
 }
Пример #3
0
 public void ContinueGame()
 {
     PanelPause.SetActive(false);
     ButtonPause.SetActive(true);
     v_on.SetActive(false);
     v_off.SetActive(false);
     Time.timeScale = 1;
 }
Пример #4
0
        /// <summary>
        /// LoadContent will be called once per game and is the place to load
        /// all of your content.
        /// </summary>
        protected override void LoadContent()
        {
            // Create a new SpriteBatch, which can be used to draw textures.
            spriteBatch = new SpriteBatch(GraphicsDevice);

            //gravitációhoz
            player = new Character(Content.Load <Texture2D>("Others/character"), new Vector2(50, 50));

            //Kamera követés
            _camera = new Camera();

            _components = new List <Component>()
            {
                new Sprite(Content.Load <Texture2D>("Others/bg")),
                //player,
                new Sprite(Content.Load <Texture2D>("Others/bg"))
            };

            //háttér
            background = Content.Load <Texture2D>("Others/bg");


            //platformokhoz
            platforms.Add(new Platform(Content.Load <Texture2D>("Others/block"), new Vector2(30, 400)));
            platforms.Add(new Platform(Content.Load <Texture2D>("Others/block"), new Vector2(350, 300)));
            platforms.Add(new Platform(Content.Load <Texture2D>("Others/block"), new Vector2(700, 350)));

            //hangok
            effect = Content.Load <SoundEffect>("Jump");
            song   = Content.Load <Song>("Pyro");
            MediaPlayer.Play(song);

            Mordecai.character       = Content.Load <Texture2D>("Others/character");
            Mordecai.mordecai_down   = Content.Load <Texture2D>("Others/mordecai_down");
            Mordecai.mordecai_jump   = Content.Load <Texture2D>("Others/mordecai_jump");
            Mordecai.character_right = Content.Load <Texture2D>("Others/character_right");

            _currentState = new MenuState(this, graphics.GraphicsDevice, Content);

            IsMouseVisible = true;

            //PAUSE
            pausedTexture   = Content.Load <Texture2D>("Others/pause");
            pausedRectangle = new Rectangle(0, 0, pausedTexture.Width, pausedTexture.Height);
            btnPlay         = new ButtonPause();
            btnPlay.Load(Content.Load <Texture2D>("Controls/btnNG"), new Vector2(465, 260));
            btnQuit = new ButtonPause();
            btnQuit.Load(Content.Load <Texture2D>("Controls/btnExit"), new Vector2(465, 360));
        }
Пример #5
0
 public void PauseOn()
 {
     PanelPause.SetActive(true);
     ButtonPause.SetActive(false);
     Time.timeScale = 0;
     if (PlayerPrefs.GetInt("Volume") == 0)
     {
         v_on.SetActive(false);
         v_off.SetActive(true);
     }
     else
     {
         v_on.SetActive(true);
         v_off.SetActive(false);
     }
 }
Пример #6
0
        partial void OnButtonPausePressed(MonoTouch.Foundation.NSObject sender)
        {
            mIsPaused = !mIsPaused;

            if (mIsPaused)
            {
                mGridUIView.Alpha = 0.2f;
                LabelTime.Text    = "Pause";
                ButtonPause.SetTitle("Resume", UIControlState.Normal);
            }
            else
            {
                mGridUIView.Alpha = 1f;
                LabelTime.Text    = "Resuming";
                ButtonPause.SetTitle("Pause", UIControlState.Normal);
            }
        }
Пример #7
0
 void Awake()
 {
     instance = this;
 }
Пример #8
0
 void Awake()
 {
     instance = this;
 }