public GameClass(bool startFullScreen, Size size, bool enableNetwork)
    {
        this.startFullscreen = startFullScreen;
        this.Size            = size;
        this.networkEnabled  = enableNetwork;
        this.Text            = "SpaceWar3D-Step11";
        statusMessageTimer   = Constants.StatusMessageDisplayTime;

        drawingFont = new GraphicsFont("Verdana", System.Drawing.FontStyle.Regular);

        input           = new InputClass(this);
        mouseInput      = new MouseInput(this);
        this.MouseMove += new MouseEventHandler(GameClass_MouseMove);
        this.Cursor     = Cursors.NoMove2D;

        camera       = new Camera();
        soundHandler = new SoundHandler(this);

        if (networkEnabled)
        {
            peer = new PlayClass(this);
            if (peer.IsHost)
            {
                hullColor = HullColors.Red;
            }
        }
    }
示例#2
0
 public GraphicsClass()
 {
     this.Text   = "Step1";
     play        = new PlayClass(this);
     input       = new InputClass(this, play);
     drawingFont = new GraphicsFont("Arial", System.Drawing.FontStyle.Bold);
 }
    public GameClass(bool startFullScreen, Size size, bool enableNetwork)
    {
        this.startFullscreen = startFullScreen;
        this.Size = size;
        this.networkEnabled = enableNetwork;
        this.Text = "SpaceWar3D-Step12";
        statusMessageTimer = Constants.StatusMessageDisplayTime;

        drawingFont = new GraphicsFont( "Verdana", System.Drawing.FontStyle.Regular);

        input = new InputClass(this);
        mouseInput = new MouseInput(this);
        this.MouseMove +=new MouseEventHandler(GameClass_MouseMove);
        this.Cursor = Cursors.NoMove2D;

        camera = new Camera();
        soundHandler = new SoundHandler(this);

        if (networkEnabled) {
            peer = new PlayClass(this);
            if (peer.IsHost) {
                hullColor = HullColors.Red;
            }
        }
    }
示例#4
0
 public GraphicsClass()
 {
     this.Text   = "Direct3DTest";
     audio       = new AudioClass(this);
     play        = new PlayClass(this);
     input       = new InputClass(this, audio, play);
     drawingFont = new GraphicsFont("Arial", System.Drawing.FontStyle.Bold);
 }
    public InputClass(Control owner, PlayClass play)
    {
        this.owner = owner;
        this.play  = play;

        localDevice = new Device(SystemGuid.Keyboard);
        localDevice.SetDataFormat(DeviceDataFormat.Keyboard);
        localDevice.SetCooperativeLevel(owner, CooperativeLevelFlags.Foreground | CooperativeLevelFlags.NonExclusive);
    }
    public InputClass(Control owner, PlayClass play)
    {
        this.owner = owner;
        this.play = play;

        localDevice = new Device(SystemGuid.Keyboard);
        localDevice.SetDataFormat(DeviceDataFormat.Keyboard);
        localDevice.SetCooperativeLevel(owner, CooperativeLevelFlags.Foreground | CooperativeLevelFlags.NonExclusive);
    }
    public GameClass(bool startFullScreen, Size size, bool enableNetwork)
    {
        this.startFullscreen = startFullScreen;
        this.Size = size;
        this.networkEnabled = enableNetwork;
        this.Text = "SpaceWar3D-Step02";

        drawingFont = new GraphicsFont( "Verdana", System.Drawing.FontStyle.Regular);

        input = new InputClass(this, play);

        if (networkEnabled) {
            peer = new PlayClass(this);
        }
    }
示例#8
0
    //private PlayClass peer;

    #region GameClass Constructor
    public GameClass(bool startFullScreen, Size size, bool enableNetwork)
    {
        this.startFullscreen = startFullScreen;
        this.Size            = size;
        this.networkEnabled  = enableNetwork;
        this.Text            = "SpaceWar3D";

        actualFont = new System.Drawing.Font("Arial", 14.0f, FontStyle.Italic);

        input = new InputClass(this, play);

        if (networkEnabled)
        {
            play = new PlayClass(this);
        }
    }
示例#9
0
    public GameClass(bool startFullScreen, Size size, bool enableNetwork)
    {
        this.startFullscreen = startFullScreen;
        this.Size            = size;
        this.networkEnabled  = enableNetwork;
        this.Text            = "SpaceWar3D-Step02";

        drawingFont = new GraphicsFont("Verdana", System.Drawing.FontStyle.Regular);

        input = new InputClass(this, play);

        if (networkEnabled)
        {
            peer = new PlayClass(this);
        }
    }
    public GameClass(bool startFullScreen, Size size, bool enableNetwork)
    {
        this.startFullscreen = startFullScreen;
        this.Size = size;
        this.networkEnabled = enableNetwork;
        this.Text = "SpaceWar3D-Step06";

        drawingFont = new GraphicsFont( "Verdana", System.Drawing.FontStyle.Regular);

        input = new InputClass(this);
        mouseInput = new MouseInput(this);
        this.MouseMove +=new MouseEventHandler(GameClass_MouseMove);
        camera = new Camera();
        soundHandler = new SoundHandler(this);

        if (networkEnabled) {
            peer = new PlayClass(this);
        }
    }
示例#11
0
    public GameClass(bool startFullScreen, Size size, bool enableNetwork)
    {
        this.startFullscreen = startFullScreen;
        this.Size            = size;
        this.networkEnabled  = enableNetwork;
        this.Text            = "SpaceWar3D";

        drawingFont = new GraphicsFont("Verdana", System.Drawing.FontStyle.Regular);

        input           = new InputClass(this);
        mouseInput      = new MouseInput(this);
        this.MouseMove += new MouseEventHandler(GameClass_MouseMove);
        camera          = new Camera();
        soundHandler    = new SoundHandler(this);

        if (networkEnabled)
        {
            peer = new PlayClass(this);
        }
    }