eliza
eliza
CC#
Created by eliza on 6/18/2024 in #help
Not increasing Score integer
Update: moving variable to main File (Game1.cs) and make it static helped
12 replies
CC#
Created by eliza on 6/18/2024 in #help
Not increasing Score integer
C#
public class Gameplay
{
private Game1 game;
private GraphicsDevice graphicsDevice;
public ContentManager contentManager;
private Texture2D mainMenuBackground;
private Texture2D pianoTexture;
public Texture2D pianoEndTexture;
public Rectangle pianoEndRectangle;
public Texture2D NoteTexture;
public Texture2D SliderTexture;
private static List<GameplayObject> gameplayObjects;
private SpriteFont font;
private Parser parser = new Parser();
private LowLevelKeyboardListener keyboardListener;
private static SoundEngineXact soundEngine;
private string beatmapFile;
private SpriteBatch spriteBatch;
private bool isInitialized;
private static bool isTouched;
private int Score;

public Gameplay(ContentManager contentManager, Game1 game, Texture2D noteTexture, Texture2D sliderTexture, string beatmapFile)
{
this.contentManager = contentManager;
this.game = game;
this.NoteTexture = noteTexture;
this.SliderTexture = sliderTexture;
this.beatmapFile = beatmapFile;
isTouched = false;

LoadContent(contentManager, spriteBatch);
Initialize(game);
}
C#
public class Gameplay
{
private Game1 game;
private GraphicsDevice graphicsDevice;
public ContentManager contentManager;
private Texture2D mainMenuBackground;
private Texture2D pianoTexture;
public Texture2D pianoEndTexture;
public Rectangle pianoEndRectangle;
public Texture2D NoteTexture;
public Texture2D SliderTexture;
private static List<GameplayObject> gameplayObjects;
private SpriteFont font;
private Parser parser = new Parser();
private LowLevelKeyboardListener keyboardListener;
private static SoundEngineXact soundEngine;
private string beatmapFile;
private SpriteBatch spriteBatch;
private bool isInitialized;
private static bool isTouched;
private int Score;

public Gameplay(ContentManager contentManager, Game1 game, Texture2D noteTexture, Texture2D sliderTexture, string beatmapFile)
{
this.contentManager = contentManager;
this.game = game;
this.NoteTexture = noteTexture;
this.SliderTexture = sliderTexture;
this.beatmapFile = beatmapFile;
isTouched = false;

LoadContent(contentManager, spriteBatch);
Initialize(game);
}
here is code for beginning of the class
12 replies
CC#
Created by eliza on 6/18/2024 in #help
Not increasing Score integer
nothing
12 replies
CC#
Created by eliza on 6/18/2024 in #help
Not increasing Score integer
nope
12 replies
CC#
Created by eliza on 6/18/2024 in #help
Not increasing Score integer
in the class Gameplay
12 replies
CC#
Created by eliza on 6/11/2024 in #help
Weird behaviour with SpriteBatch.Draw in MonoGame
They should move to down
3 replies