public Aide(Game1 g, String nameImage, String nameText) { game = g; image = g.Content.Load<Texture2D>(nameImage); text = g.Content.Load<String>(nameText); Console.WriteLine(text); }
public KinectInput(Game1 g) : base(g) { LeftY = RightY = 0; KinectSensor.KinectSensors.StatusChanged += new EventHandler<StatusChangedEventArgs>(KinectSensors_StatusChanged); DiscoverKinectSensor(); }
/// <summary> /// The main entry point for the application. /// </summary> static void Main(string[] args) { using (Game1 game = new Game1()) { game.Run(); } }
public Menu(Game1 g, String title, List<string> items) { game = g; Title = title; MenuItems = items; Iterator = 0; }
public Jeu(Game1 g, Difficulty d, bool isOnePlayer) { game = g; IsOnePlayer = isOnePlayer; difficulty = d; ball = new Ball(game, d); resetTimer = 0; resetTimerInUse = true; decompte = ""; lastScored = Side.LEFT; }
public Ball(Game1 game, Difficulty d) { // creer la balle setSpeed(d); int width = game.ScreenWidth / 30; texture = game.Content.Load<Texture2D>("balle"); scale = (float) width / (float) texture.Width; size = new Rectangle(0, 0, width, width); resetPos = new Vector2(game.ScreenWidth / 2, game.ScreenHeight / 2); position = resetPos; direction = 0; rand = new Random(); isVisible = false; }
/// <summary> /// Initialise une batte /// </summary> /// <param name="game">Le jeu propriétaire</param> /// <param name="side">Si true alors à gauche sinon à droite de l'écran</param> public Bat(Game1 game, Side side, Difficulty d) { points = 0; this.side = side; int height = game.ScreenHeight / getRatio(d); int width = game.ScreenWidth / RatioWidth; texture = new Texture2D(game.GraphicsDevice, width, height); Color[] dataTitle = new Color[width * height]; for (int index = 0; index < dataTitle.Length; ++index) dataTitle[index] = Color.Yellow; texture.SetData(dataTitle); size = new Rectangle(0, 0, width, height); if (side == Side.LEFT) position = new Vector2(0, game.ScreenHeight / 2 - height / 2); else position = new Vector2(game.ScreenWidth - width, game.ScreenHeight / 2 - height / 2); yHeight = game.ScreenHeight; }
/// <summary> /// Initialise une batte /// </summary> /// <param name="game">Le jeu propriétaire</param> /// <param name="side">Si true alors à gauche sinon à droite de l'écran</param> public BatKeyboard(Game1 game, Side side, Difficulty d, KeyboardInput i) : base(game, side, d) { input = i; switch (d) { case Difficulty.EASY: BaseSpeed = 8f; increaseSpeed = 0.9f; break; case Difficulty.MEDIUM: BaseSpeed = 10f; increaseSpeed = 1.8f; break; default: BaseSpeed = 12f; increaseSpeed = 3.6f; break; } MaxSpeed = BaseSpeed + 3 * increaseSpeed; speed = BaseSpeed; }
/// <summary> /// Initialise une batte /// </summary> /// <param name="game">Le jeu propriétaire</param> /// <param name="side">Si true alors à gauche sinon à droite de l'écran</param> public BatKinect(Game1 game, Side side, Difficulty d, KinectInput i) : base(game, side, d) { input = i; }
public JeuKinect(Game1 g, Difficulty d, bool isOp, KinectInput i) : base(g, d, isOp) { input = i; setBats(); }
public KeyboardInput(Game1 g) : base(g) { keyboardState = Keyboard.GetState(); lastState = keyboardState; }
public Input(Game1 g) { game = g; }
public AIBat(Game1 game, Side side, Difficulty d, Ball b) : base(game, side, d, null) { ball = b; }
public JeuKeyboard(Game1 g, Difficulty d, bool isOp, KeyboardInput i) : base(g, d, isOp) { input = i; setBats(); }
public MenuKinect(Game1 g, String title, List<string> items, KinectInput input) : base(g, title, items) { this.input = input; }
public MenuKeyboard(Game1 g, String title, List<string> items, KeyboardInput input) : base(g, title, items) { this.input = input; }