コード例 #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
ファイル: Image.cs プロジェクト: Bob-Thomas/Tron.bob.nick
 //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
ファイル: Program.cs プロジェクト: Bob-Thomas/Tron.bob.nick
 /// <summary>
 /// The main entry point for the application.
 /// </summary>
 static void Main(string[] args)
 {
     using (TronGame game = new TronGame())
     {
         game.Run();
     }
 }
コード例 #5
0
ファイル: Tail.cs プロジェクト: Bob-Thomas/Tron.bob.nick
       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
ファイル: Player1.cs プロジェクト: Bob-Thomas/Tron.bob.nick
 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");
 }
コード例 #7
0
 //constructor
 public LevelEditorScene(TronGame game)
 {
     this.game = game;
     this.Initialize();
 }
コード例 #8
0
 //constructor
 public MenuStartScene(TronGame game)
 {
     this.game = game;
     this.Initialize();
 }
コード例 #9
0
ファイル: Grid.cs プロジェクト: Bob-Thomas/Tron.bob.nick
 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();
 }