コード例 #1
0
ファイル: Laser Turret.cs プロジェクト: cmsboyd/LPProject
 public Laser_Turret(InputController.InputMode playerMode)
 {
     input = new InputController(playerMode);
     position = new Vector2(0, 0);
     orientation = 0f;
     id = "Player1";
     color = Color.Red;
     cursor = new Cursor(this, input, m_parent);
     m_rotation = 0;
 }
コード例 #2
0
ファイル: Game1.cs プロジェクト: gogodr/CEIDS-Old-Files
 /// <summary>
 /// LoadContent will be called once per game and is the place to load
 /// all of your content.
 /// </summary>
 protected override void LoadContent()
 {
     // Create a new SpriteBatch, which can be used to draw textures.
     spriteBatch = new SpriteBatch(GraphicsDevice);
                
     cursor = new Cursor(Content);
     cursor2 = new Cursor(Content);
     
    
     mandar = new Thread(new ThreadStart(mandacion));
     mandar.Start();
     
     // TODO: use this.Content to load your game content here
 }
コード例 #3
0
ファイル: Game1.cs プロジェクト: gogodr/CEIDS-Old-Files
        protected override void LoadContent()
        {
            serv = new Server("192.168.52.56", 8888);
            serv.comenzarServidor();

            eso = new Thread(new ThreadStart(dat));
            eso.Start();

            // Create a new SpriteBatch, which can be used to draw textures.
            spriteBatch = new SpriteBatch(GraphicsDevice);

            cursor = new Cursor(Content);
            cursor2 = new Cursor(Content);


            // TODO: use this.Content to load your game content here
        }
コード例 #4
0
ファイル: Laser Turret.cs プロジェクト: cmsboyd/LPProject
        public Laser_Turret(Level parent, InputController.InputMode playerMode, LevelManager Manager, int a, int b, int c)
        {
            energy = 748;
            health = 748;
            m_parent = parent;
            input = new InputController(playerMode);
            id = input.getMode();
            manager = Manager;

               reflect_limit=b;
               absorb_limit=a;
               refract_limit=c;
               absorb_amount=0;
               reflect_amount=0;
               refract_amount=0;
               m_rotation = 0;

            switch (id)
            {
                case "Player1":
                    health_bar_pos = 0;
                    energy_bar_pos = 8;
                    position = new Vector2(30, m_parent.height / 2);
                    laserStart = new Vector2(51, m_parent.height / 2);
                    orientation = 0f;
                    id = "Player 1";
                    color = Color.Red;
                    cursor = new Cursor(this, input, m_parent);
                    break;

                case "Player2":

                    health_bar_pos = m_parent.width - 5;
                    energy_bar_pos = m_parent.width - 13;
                    position = new Vector2(m_parent.width - 33, m_parent.height / 2);
                    laserStart = new Vector2(m_parent.width - 54, m_parent.height / 2);
                    orientation = (float)Math.PI;
                    id = "Player 2";
                    color = Color.Blue;

                    cursor = new Cursor(this, input, m_parent);
                    break;

                default:
                    throw new NotImplementedException("Received unexpected input mode");
            }
            bounds = new BoundingBox(new Vector3(position.X - 20, position.Y - 20, -1), new Vector3(position.X + 20, position.Y + 20, 1));
        }