public override void start_up(Game game_, GraphicsDeviceManager graphics_, ContentManager content, Controls[] controllers_)
        {
            //if his continues to cause problems could just
            // put it in play state and have referene
            view = new View(graphics_, content);

            world = new World(view, 10, 10 ,100);
            //world = new HexWorld(view, 5, 100);

            teams.Add(new Team(Team_Color_e.GREEN, null));
            teams.Add(new Team(Team_Color_e.RED, null));

            for (int i = 0; i < 4; i++)
            {
                //Player p = new H_Player(controllers_[i], new Vector3(100, 100, 100 + 50*i), new Vector3(50, 50, 50));
                Player p = new H_Player(game_, controllers_[i], get_World().get_next_Base_Tile().get_top_center(), 50 * Vector3.One);
                add_player(p);
                p.Team = teams[i % 2];
            }

            view.add_player_view(new Player_View((H_Player)players.ElementAt(0), view.get_graphics(), view.get_content()));
            view.add_player_view(new Player_View((H_Player)players.ElementAt(2), view.get_graphics(), view.get_content()));
            view.add_player_view(new Player_View((H_Player)players.ElementAt(1), view.get_graphics(), view.get_content()));
            view.add_player_view(new Player_View((H_Player)players.ElementAt(3), view.get_graphics(), view.get_content()));
        }
        public Mediator_Player_Controls(Controls c_, H_Player p_)
        {
            p_avatar = p_;
            c_input = c_;
            shooter = Shoot_State.CHILL;
            jumper = Jump_State.ON_GROUND;
            AirTime = new Stopwatch();
            AirTime.Reset();
            AirTime.Stop();

            cur_structure = 0;
            structure_wheel.Add(Structure_Type_e.HEALING_POOL);
            structure_wheel.Add(Structure_Type_e.SNOW_FACTORY);
            structure_wheel.Add(Structure_Type_e.FORT);
            structure_wheel.Add(Structure_Type_e.SNOWMAN);
        }
Beispiel #3
0
        public H_Player(Game game_, Controls control_, Vector3 center_, Vector3 size_, Quaternion theta_)
            : base(center_, size_, theta_)
        {
            //So since everything is a reference if we set the camera's position to
            //the same reference as Seen Object's Center should update in sync
            //If not, we need to update the camera during update

            //OLD
            //camera = new Camera(center, Vector3.Up, Vector3.Backward);

            camera = new CameraComponent(game_);
            PC_mediator = new Mediator_Player_Controls(control_, this);

            structure_wheel_pos = Structure_Type_e.HEALING_POOL;

            camera.Perspective(95, 1280 / 800, 2f, 3000);
            //game_.GraphicsDevice.Viewport.AspectRatio
            //DO THIS BRO
            //aspectRatio = graphics.GraphicsDevice.Viewport.AspectRatio;
        }
Beispiel #4
0
        protected override void Initialize()
        {
            //graphics = new GraphicsDeviceManager(this);
            Content.RootDirectory = "Content";

            controllers = new Controls[4];
            teams = new List<Team>();

            controllers[0] = new Controls(PlayerIndex.One);
            controllers[1] = new Controls(PlayerIndex.Two);
            controllers[2] = new Controls(PlayerIndex.Three);
            controllers[3] = new Controls(PlayerIndex.Four);

            ActiveKeyboardPlayer = 0;

            GM_Proxy.Instance.Start_Model(this, graphics, content, controllers, "standard");
            base.Initialize();
        }
Beispiel #5
0
 public void start_up(Game game_, GraphicsDeviceManager graphics_, ContentManager content_, Controls[] controllers_)
 {
     Start_Model(game_, graphics_, content_, controllers_, "standard");
 }
Beispiel #6
0
        public void Start_Model(Game game_, GraphicsDeviceManager graphics_, ContentManager content_, Controls[] controllers_, string model_type_)
        {
            if (model_type_ == "standard")
                GM = new Standard_Model();
            else
                GM = new Standard_Model();  //Since We have nothing else for now

            sprtbtchref = new SpriteBatch(graphics_.GraphicsDevice);
            content = content_;

            GM.start_up(game_, graphics_, content_, controllers_);
        }
Beispiel #7
0
 public virtual void start_up(Game game_, GraphicsDeviceManager graphics_, ContentManager content, Controls[] controllers_)
 {
 }
Beispiel #8
0
 public H_Player(Game game_, Controls control_, Vector3 center_, Vector3 size_)
     : this(game_, control_, center_, size_, Globals.Game_Obj_Quat)
 {
 }
Beispiel #9
0
 public H_Player(Game game_, Controls control_)
     : this(game_, control_, Globals.Game_Obj_Origin, Globals.Game_Obj_Size, Globals.Game_Obj_Quat)
 {
 }