-
12-03-2013, 04:03 PM #41Junior Member
- Ngày tham gia
- Sep 2015
- Bài viết
- 0
Dạ em cảm ơn anh!
Em sẽ cố gắng.Mong anh giúp đỡ.
-
12-03-2013, 06:00 PM #42Junior Member
- Ngày tham gia
- Sep 2015
- Bài viết
- 0
Gửi bởi thydu90
nếu mở rộng thành đồ án tốt nghiệp thì mình có ý tưởng này
- game mới chỉ có chức năng bóng bật vào thành nẩy lại, giờ thêm xử lí 2 quả bóng va chạm nhau nẩy lại , rồi khi chạm ngón tay vào 1 quả bóng đang bay thì nó bị tách làm 2 quả chẳng hạn. xử lí hàng trăm quả bóng va chạm lung tum cũng ko hề đơn giản đâu... nói chung bôi nữa ra thì đề tài này cũng ko vừa đâu [IMG]images/smilies/biggrin.png[/IMG]
good luck !
-
15-03-2013, 03:11 PM #43Junior Member
- Ngày tham gia
- Sep 2015
- Bài viết
- 0
Gửi bởi zstar
Em xin chân thành cảm ơn
-
19-03-2013, 09:49 AM #44Junior Member
- Ngày tham gia
- Sep 2015
- Bài viết
- 0
Gửi bởi thydu90
-
01-04-2013, 03:48 PM #45Junior Member
- Ngày tham gia
- Sep 2015
- Bài viết
- 0
Em viêt code chỉ vẽ được như trên,Em muốn vẽ lưới có nhiều ô hơn giả sử 5x5 ấy ạ!
using System;
using System.Collections.Generic;
using System.Linq;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Audio;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.GamerServices;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using Microsoft.Xna.Framework.Input.Touch;
using Microsoft.Xna.Framework.Media;
namespace CoCaRoXXX
{
public enum CoCaRoPlayer { None, PlayerO, PlayerX }
/// <summary>
/// This is the main type for your game
/// </summary>
public class Game1 : Microsoft.Xna.Framework.Game
{
GraphicsDeviceManager graphics;
SpriteBatch spriteBatch;
Texture2D gridTexture;
Rectangle gridRectangle;
// Texture2D resetButton;
// Rectangle resetButtonPosition;
//Texture2D oPiece;
// Texture2D xPiece;
// Texture2D oWinner;
// Texture2D xWinner;
// Texture2D noWinner;
// Texture2D oTurn;
// Texture2D xTurn;
// bool winnable;
// CoCaRoPlayer winner;
// CoCaRoPlayer current;
//CoCaRoPlayer[,] grid;
//bool touching;
public Game1()
{
graphics = new GraphicsDeviceManager(this);
Content.RootDirectory = "Content";
graphics.PreferredBackBufferWidth = 480;
graphics.PreferredBackBufferHeight = 800;
// Frame rate is 30 fps by default for Windows Phone.
TargetElapsedTime = TimeSpan.FromTicks(333333);
// Extend battery life under lock.
InactiveSleepTime = TimeSpan.FromSeconds(1);
}
/// <summary>
/// Allows the game to perform any initialization it needs to before starting to run.
/// This is where it can query for any required services and load any non-graphic
/// related content. Calling base.Initialize will enumerate through any components
/// and initialize them as well.
/// </summary>
protected override void Initialize()
{
base.Initialize();
}
protected override void LoadContent()
{
// Create a new SpriteBatch, which can be used to draw textures.
spriteBatch = new SpriteBatch(GraphicsDevice);
gridTexture = Content.Load<Texture2D>("TicTacToe_Grid");
gridRectangle = new Rectangle(0, 0, spriteBatch.GraphicsDevice.Viewport.Width, spriteBatch.GraphicsDevice.Viewport.Height);
}
protected override void UnloadContent()
{
}
protected override void Update(GameTime gameTime)
{
if (GamePad.GetState(PlayerIndex.One).Buttons.Back == ButtonState.Pressed)
this.Exit();
base.Update(gameTime);
}
protected override void Draw(GameTime gameTime)
{
GraphicsDevice.Clear(Color.Pink);
spriteBatch.Begin();
DrawGrid();
spriteBatch.End();
base.Draw(gameTime);
}
private void DrawGrid()
{
spriteBatch.Draw(gridTexture, gridRectangle, Color.Black);
}
}
}
-
19-04-2013, 11:07 AM #46Junior Member
- Ngày tham gia
- Sep 2015
- Bài viết
- 0
Em đang làm đề án về sắp xếp các thuật toán rồi chạy demo nó trên window phone a có thể cho e xin nick yahoo để hỏi bài được hok a ^^ [IMG]images/smilies/biggrin.png[/IMG]
Pallet nhựa Lâm Đồng giải pháp hoàn hảo cho nhà kho Pallet nhựa Lâm Đồng là một giải pháp đa năng và hiệu quả trong việc vận chuyển và lưu trữ hàng hóa. Trong đó, pallet nhựa Lâm Đồng không chỉ đáp...
Pallet nhựa Lâm Đồng giải pháp...