Пример #1
0
		public Wheel(Balder.Core.Application application, WheelType type)
		{
			this._application = application;

			this._roll = new Sprite();
			this._roll.AddRange(new ImageRange
			{
				FrameCount = 10,
				ArchivePath = this.GetAssetName(type),
				FileName = this.GetFileName(type),
				FileType = "png",
				NumberingFormat = "{0:00000}",
				ImageWidth = 32,
				ImageHeight = 64,
			});
			this._roll.Position = this.GetPosition(type);
			this._roll.Visibility = Visibility.Collapsed;
			application.Viewport.Scene.Nodes.Add(this._roll);

			this.Symbol = new Symbol(type);
			application.Viewport.Scene.Nodes.Add(this.Symbol);
			this.Symbol.Visibility = Visibility.Collapsed;

			this.IsHeld = false;

			this.WheelType = type;
		}
Пример #2
0
        public Wheel(Balder.Core.Application application, WheelType type)
        {
            this._application = application;

            this._roll = new Sprite();
            this._roll.AddRange(new ImageRange
            {
                FrameCount      = 10,
                ArchivePath     = this.GetAssetName(type),
                FileName        = this.GetFileName(type),
                FileType        = "png",
                NumberingFormat = "{0:00000}",
                ImageWidth      = 32,
                ImageHeight     = 64,
            });
            this._roll.Position   = this.GetPosition(type);
            this._roll.Visibility = Visibility.Collapsed;
            application.Viewport.Scene.Nodes.Add(this._roll);

            this.Symbol = new Symbol(type);
            application.Viewport.Scene.Nodes.Add(this.Symbol);
            this.Symbol.Visibility = Visibility.Collapsed;

            this.IsHeld = false;

            this.WheelType = type;
        }
Пример #3
0
        private void Application_Loaded(object sender, EventArgs e)
        {
            Balder.Core.Application application = (Balder.Core.Application) this.FindName("application");
            if (null != application)
            {
                this.application.Initialize(this, this._rootCanvas);

                application.Viewport       = new Viewport(640, 480);
                application.Viewport.Scene = new Scene();

                Slot slot = new Slot(this._rootCanvas, application);

                ScoreManager.Instance.RootCanvas = this._rootCanvas;
                //SymbolManager.Instance.CheckScore(null);
            }
        }
Пример #4
0
        public Slot(Canvas rootCanvas, Balder.Core.Application application)
        {
            this._application = application;
            this._rootCanvas  = rootCanvas;

            this._wheels = new Wheels(rootCanvas, application);

            this._scoreBoardFadeInStoryboard  = (Storyboard)rootCanvas.FindName("_scoreBoardFadeInStoryboard");
            this._scoreBoardFadeOutStoryboard = (Storyboard)rootCanvas.FindName("_scoreBoardFadeOutStoryboard");

            this._stateInfoText = (TextBlock)rootCanvas.FindName("_stateInfoText");

            this._gameOver = false;

            this.LoadAssets();
        }