我XNA遊戲,它包含這些類我如何繼承在C#中的所有基類的所有屬性
public partial class Bird : Microsoft.Xna.Framework.GameComponent
{
private Vector2 velocity;
private Vector2 position;
..........................
public Vector2 Velocity
{
get { return velocity; }
set { velocity = value; }
}
public Vector2 Position
{
get { return position; }
set { position = value; }
}
}
public class BigRedBird : Microsoft.Xna.Framework.GameComponent,Bird
{
public BigRedBird(Game game ,Rectangle area,Texture2D image)
: base(game)
{
// TODO: Construct any child components here
}
.....................
}
如何從鳥級接入位置和速度,並在 使用它BigRedBird類構造函數。
感謝