コード例 #1
0
ファイル: SpriteManager.cs プロジェクト: Telos8840/CS461
        public SpriteManager(ContentManager cm, GraphicsDevice gd, SceneManager sm, SpriteBatch sb)
        {
            contentManager = cm;
            graphicsDevice = gd;
            sceneManager = sm;
            spriteBatch = sb;
>>>>>>> ac2bd630d1c089c390c78a5c8b3b0095e3695b56
        }
コード例 #2
0
ファイル: PlaygroundScene.cs プロジェクト: Telos8840/TestGame
 public PlaygroundScene(int x, int y, int h, int w,ContentManager cm, GraphicsDevice gd, SceneManager sm)
 {
     this.x = x;
     this.y = y;
     this.width = w;
     this.height = h;
     this.sceneManager = sm;
     _contentManager = cm;
     _graphicsDevice = gd;
     Initilize();
     LoadContent();
 }
コード例 #3
0
ファイル: Game1.cs プロジェクト: Telos8840/TestGame
 protected override void Initialize()
 {
     graphics.PreferredBackBufferWidth = 240 * 3;
     graphics.ApplyChanges();
     scenemanager = new SceneManager(Content, graphics.GraphicsDevice);
     //scenemanager.addScene(new PlaygroundScene(0,0,320,480,Content, graphics.GraphicsDevice));
     string[] menuText = {"New Game","Continue","Settings","End Game"};
     Scene[] menuDest = new Scene[1];
     menuDest[0] = new PlaygroundScene(0,0,320,480,Content, graphics.GraphicsDevice,scenemanager);
     scenemanager.addScene(new MainMenu(0, 0, 320, 480, Content, graphics.GraphicsDevice,scenemanager,menuText,menuDest));
     //add Menu screen here
 }
コード例 #4
0
ファイル: Human.cs プロジェクト: Commander147/CS461
 public Human(Texture2D image, Point playerFrameSize, Vector2 position, Vector2 velocity, 
     int collisionOffset, int type, int[,] movedata, SceneManager sm)
 {
     this.image = image;
     this.playerFrameSize = playerFrameSize;
     this.position = position;
     this.velocity = velocity;
     this.collisionOffset = collisionOffset;
     this.type = type;
     this.movedata = movedata;
     sceneManager = sm;
     status = State.Waiting;
 }
コード例 #5
0
ファイル: MainMenu.cs プロジェクト: Telos8840/CS461
 public MainMenu(int x, int y, int h, int w,ContentManager cm, GraphicsDevice gd, SceneManager sm ,string[] title,Scene[] destination)
 {
     this.x = x;
     this.y = y;
     this.width = w;
     this.height = h;
     _contentManager = cm;
     _graphicsDevice = gd;
     this.sceneManager = sm;
     this.title = title.ToArray();
     this.destination = destination.ToArray();
     Initilize();
     LoadContent();
 }
コード例 #6
0
ファイル: Game1.cs プロジェクト: Commander147/CS461
 protected override void Initialize()
 {
     spritebatch = new SpriteBatch(GraphicsDevice);
     graphics.PreferredBackBufferWidth = 240 * 3;
     graphics.ApplyChanges();
     scenemanager = new SceneManager(Content, graphics.GraphicsDevice);
     //scenemanager.addScene(new PlaygroundScene(0,0,320,480,Content, graphics.GraphicsDevice));
     string[] menuText = { "New Game", "Continue", "Settings", "End Game" };
     Scene[] menuDest = new Scene[1];
     menuDest[0] = new PlaygroundScene(0, 0, 320, 480, Content, graphics.GraphicsDevice, scenemanager);
     scenemanager.addScene(new MainMenu(0, 0, 320, 480, Content, graphics.GraphicsDevice, scenemanager, menuText, menuDest));
     //add Menu screen here
     player = new VideoPlayer();
     video = Content.Load<Video>("Video/Intro");
     //player.Play(video);
 }
コード例 #7
0
ファイル: ComputerAI.cs プロジェクト: Telos8840/TestGame
 public ComputerAI(Texture2D image, Point playerFrameSize, Vector2 position, Vector2 velocity,
     int collisionOffset, int type, int[,] movedata, SceneManager sm, List<Vector2> wp)
 {
     this.image = image;
     this.playerFrameSize = playerFrameSize;
     this.position = position;
     oldPosition = position;
     this.velocity = velocity;
     this.collisionOffset = collisionOffset;
     this.type = type;
     this.movedata = movedata;
     sceneManager = sm;
     PassWaypoint(wp);
     autmove = true;
     destination = waypoints.Dequeue();
     status = State.Waiting;
 }