示例#1
0
        //constructor
        public StartScene(TronGame game)
        {
            this.game = game;
           // this.background = new Image(game, Vector2.Zero, "TitleScherm\\Background");
            this.menu = new MenuStartScene(game);

        }
示例#2
0
 //Constructor
 public Image(TronGame game,Vector2 position,string pathName)
 {
     this.game = game;
     this.position = position;
     this.texture = game.Content.Load<Texture2D>(pathName);
     this.rectangle = new Rectangle((int)this.position.X,(int)this.position.Y,this.texture.Width,this.texture.Height);
 }
示例#3
0
 //constructor
 public PlayScene(TronGame game)
 {
     this.game = game;
     this.player = new Player1(this.game, new Vector2(32, 32), 7.5f, Color.Red, PlayerIndex.One);
     this.grid = new Grid(this.game);
     this.Initialize();
 }
示例#4
0
 /// <summary>
 /// The main entry point for the application.
 /// </summary>
 static void Main(string[] args)
 {
     using (TronGame game = new TronGame())
     {
         game.Run();
     }
 }
示例#5
0
       public Tail(TronGame game, Vector2 position,Color color)
       {
           this.game = game;
           this.position = position;
           this.color = color;
           this.text = this.game.Content.Load<Texture2D>(@"InGameAssets/Player/player");
           this.rectangle = new Rectangle((int)this.position.X, (int)this.position.Y, text.Width, text.Height);

       }
示例#6
0
 public Player1(TronGame game, Vector2 position, float speed,Color colorPlayer,PlayerIndex index)
 {
     this.game = game;
     this.position = position;
     this.texture = this.game.Content.Load<Texture2D>(@"IngameAssets/Player/player");
     this.rectangle = new Rectangle((int)this.position.X, (int)this.position.Y, texture.Width, texture.Height);           
     this.speed = speed;
     this.colorPlayer = colorPlayer;
     this.index = index;
     this.state = new Idle1(this,"Right");
 }
 //constructor
 public LevelEditorScene(TronGame game)
 {
     this.game = game;
     this.Initialize();
 }
 //constructor
 public MenuStartScene(TronGame game)
 {
     this.game = game;
     this.Initialize();
 }
示例#9
0
 public Grid(TronGame game)
 {
     this.game = game;
     texture1px = new Texture2D(game.Graphics.GraphicsDevice, 1, 1);
     texture1px.SetData(new Color[] { Color.White });
 }
示例#10
0
 //constructor
 public QuitScene(TronGame game)
 {
     this.game = game;
     this.Initialize();
 }
示例#11
0
 //constructor
 public OptionScene(TronGame game)
 {
     this.game = game;
     this.Initialize();
 }