public override void Initialize() { _input = (InputComponent)Game.Services.GetService(typeof(InputComponent)); _ScoreServ = (ScoreService)Game.Services.GetService(typeof(ScoreService)); base.Initialize(); }
protected override void Initialize() { InputComponent input = new InputComponent(this); Components.Add(input); Services.AddService(typeof(InputComponent), input); bordComponent = new BordComponent(this); textComponent = new TextComponent(this); this.Components.Add(bordComponent); this.Components.Add(textComponent); spriteBatch = new SpriteBatch(GraphicsDevice); ScoreService Scores = new ScoreService(); Services.AddService(typeof(ScoreService), Scores); base.Initialize(); }
public override void Initialize() { _input = (InputComponent)Game.Services.GetService(typeof(InputComponent)); _ScoreServ = (ScoreService)Game.Services.GetService(typeof(ScoreService)); _ScoreServ.Score = 0; _ScoreServ.gameOver = false; base.Initialize(); spawnRow(); moveFallingGems(); spawnRow(); moveFallingGems(); spawnRow(); moveFallingGems(); spawnRow(); moveFallingGems(); detectClusters(); _remainingMoves = 0; _ScoreServ.clickCount = 0; }