Ejemplo n.º 1
0
        public GameRenderer(DDGameGraphics graphic, DDGameSurface surface)
        {
            this.m_graphics = graphic;
            this.m_surface = surface;

            this.Initialize();
        }
Ejemplo n.º 2
0
        public void Initialize()
        {
            // Initialize game components.
            this.m_surface = new DDGameSurface(this.m_form);

            Stream stream = Assembly.GetExecutingAssembly().GetManifestResourceStream("BattleCity.Resources.Graphics.xml");
            this.m_graphics = new DDGameGraphics(stream, this.m_surface);
            stream.Close();

            this.m_keyboard = new DIKeyboard(this.m_form);

            this.m_game = new GameRenderer(this.m_graphics, this.m_surface);

            TraceFrm.TRACE(this.m_form, "Initialize : OK");

            if (this.m_processThread == null)
            {
                this.m_processThread = new Thread(new ThreadStart(this.DoProcess));
                this.m_processThread.IsBackground = true;
                this.m_processThread.Start();
            }

            System.Diagnostics.Trace.Write("RunGame");

            this.m_game.RunningState = RunningStates.Loading;
            this.RunGame();
        }
Ejemplo n.º 3
0
 public Effect(DDGameGraphics graphic, DDGameSurface surface, PointF location)
     : base(graphic["Effect"], surface, location)
 {
     this.m_framesPerSecond = 12F;
 }
Ejemplo n.º 4
0
 public BonusItem(DDGameGraphics graphic, DDGameSurface surface, PointF location)
     : base(graphic["Bonus"], surface, location)
 {
 }
Ejemplo n.º 5
0
 public TotalTankIcon(DDGameGraphics graphic, DDGameSurface surface, PointF location, int type)
     : base(graphic["InfoIcons"], surface, location, type + 3)
 {
 }
Ejemplo n.º 6
0
 public TitleText(DDGameGraphics graphic, DDGameSurface surface, PointF location)
     : base(graphic["Title"], surface, location)
 {
 }
Ejemplo n.º 7
0
 public PlayerLifeIcon(DDGameGraphics graphic, DDGameSurface surface, PointF location, bool secondPlayer)
     : base(graphic["InfoIcons"], surface, location, (secondPlayer) ? 2 : 1)
 {
 }
Ejemplo n.º 8
0
 public MapItem(DDGameGraphics graphic, DDGameSurface surface, PointF location)
     : base(graphic["MapItems"], surface, location)
 {
     this.m_framesPerSecond = 16F;
 }
Ejemplo n.º 9
0
 public LoadingText(DDGameGraphics graphic, DDGameSurface surface, PointF location)
     : base(graphic["Loading"], surface, location)
 {
     this.m_framesPerSecond = 7F;
 }
Ejemplo n.º 10
0
 public HomeEagle(DDGameGraphics graphic, DDGameSurface surface, PointF location)
     : base(graphic["HomeEagle"], surface, location)
 {
 }
Ejemplo n.º 11
0
 public GameOverText(DDGameGraphics graphic, DDGameSurface surface, PointF location)
     : base(graphic["GameOver"], surface, location)
 {
 }
Ejemplo n.º 12
0
 public FlagIcon(DDGameGraphics graphic, DDGameSurface surface, PointF location)
     : base(graphic["InfoIcons"], surface, location, 0)
 {
 }