コード例 #1
0
 private OrbIt()
     : base(true)
 {
     game = this;
     Content.RootDirectory = "Content";
     Graphics.SynchronizeWithVerticalRetrace = true;
     ExitConfirmation = false;
     Manager.Input.InputMethods = InputMethods.Mouse | InputMethods.Keyboard;
     prefWindowedResolution = resolutions.HD_1366x768;
     Manager.AutoCreateRenderTarget = false;
     Graphics.PreferMultiSampling = false;
     SystemBorder = false;
 }
コード例 #2
0
        public Sidebar(UserInterface ui)
        {
            this.game = ui.game;
            //this.room = ui.game.room;
            this.ui = ui;
            NotImplemented = delegate {
                PopUp.Toast("Not Implemented. Take a hike.");
                //throw new NotImplementedException();
            };
            manager = game.Manager;

            manager.SetSkin("Green");
        }
コード例 #3
0
        //public Group activeGroup = null;
        public InspectorArea(Sidebar sidebar, Control parent, int Left, int Top)
        {
            //get rid of these if not needed.
            this.game = sidebar.game;
            this.ui = sidebar.ui;
            this.sidebar = sidebar;
            this.manager = sidebar.manager;
            this.parent = parent;

            this.Left = Left;
            this.Top = Top;

            this.GenerateFields = true; //todo: set to true when usermode is set up (so you can see fields in debug)
            //this.ActiveInspectorParent = sidebar.ActiveInspectorParent;

            Initialize();
        }
コード例 #4
0
 public GlobalGameMode(OrbIt game)
 {
     this.game = game;
     playersHurtPlayers = new Toggle<float>(1f, true);
     nodesHurtPlayers = new Toggle<float>(1f, false);
     playersHurtNodes = new Toggle<float>(1f, true);
     nodesHurtNodes = new Toggle<float>(1f, false);
     scoringMode = ScoringModes.playerKills;
     _gameMode = GameModes.FreeForAll;
     SetUpTeams();
     globalColor = Color.Purple;
 }
コード例 #5
0
        public Room(OrbIt game, int worldWidth, int worldHeight, bool Groups = true)
        {
            groups = new RoomGroups(this);
            AllActiveLinks = new ObservableHashSet<Link>();
            AllInactiveLinks = new ObservableHashSet<Link>();

            this.worldWidth = worldWidth;
            this.worldHeight = worldHeight;

            scheduler = new Scheduler();
            borderColor = Color.DarkGray;

            // grid System
            gridsystemAffect = new GridSystem(this, 40, new Vector2(0, worldHeight - OrbIt.ScreenHeight), worldWidth, OrbIt.ScreenHeight);
            collisionManager = new CollisionManager(this);
            //gridsystemAffect = new GridSystem(this, 40, new Vector2(0, worldHeight - OrbIt.Height), worldWidth, OrbIt.Height);
            level = new Level(this, 40, 40, gridsystemAffect.cellWidth, gridsystemAffect.cellHeight);
            roomRenderTarget = new RenderTarget2D(game.GraphicsDevice, OrbIt.ScreenWidth, OrbIt.ScreenHeight);
            //gridsystemCollision = new GridSystem(this, gridsystemAffect.cellsX, new Vector2(0, worldHeight - OrbIt.Height), worldWidth, OrbIt.Height);
            camera = new ThreadedCamera(this, 1f);
            DrawLinks = true;
            scheduler = new Scheduler();

            players = new HashSet<Player>();

            #region ///Default User props///
            Dictionary<dynamic, dynamic> userPr = new Dictionary<dynamic, dynamic>() {
                { nodeE.position, new Vector2(0, 0) },
                { nodeE.texture, textures.blackorb },
            };
            #endregion

            defaultNode = new Node(this, userPr);
            defaultNode.name = "master";
            //defaultNode.IsDefault = true;

            foreach(Component c in defaultNode.comps.Values)
            {
                c.AfterCloning();
            }

            Node firstdefault = new Node(this, ShapeType.Circle);
            //firstdefault.addComponent(comp.itempayload, true);
            Node.cloneNode(defaultNode, firstdefault);
            firstdefault.name = "[G0]0";
            //firstdefault.IsDefault = true;

            masterGroup = new Group(this, defaultNode, null, defaultNode.name, false);
            if (Groups)
            {
                new Group(this, defaultNode, masterGroup, "General Groups", false);
                new Group(this, defaultNode, masterGroup, "Preset Groups", false);
                new Group(this, defaultNode.CreateClone(this), masterGroup, "Player Group", true);
                new Group(this, defaultNode, masterGroup, "Item Group", false);
                new Group(this, defaultNode, masterGroup, "Link Groups", false);
                new Group(this, defaultNode.CreateClone(this), masterGroup, "Bullet Group", true);
                new Group(this, defaultNode, masterGroup, "Wall Group", true);
                new Group(this, firstdefault, groups.general, "Group1");
            }

            Dictionary<dynamic, dynamic> userPropsTarget = new Dictionary<dynamic, dynamic>() {
                    { typeof(ColorChanger), true },
                    { nodeE.texture, textures.ring }
            };

            targetNodeGraphic = new Node(this,userPropsTarget);

            targetNodeGraphic.name = "TargetNodeGraphic";

            //MakeWalls(WallWidth);

            MakePresetGroups();
            MakeItemGroups();
        }
コード例 #6
0
 public FrameRateCounter(OrbIt game)
 {
     //content = new ContentManager(game.Services);
     this.game = game;
 }
コード例 #7
0
 public static void Start()
 {
     if (game != null) throw new SystemException("Game was already Started");
     game = new OrbIt();
     game.Run(); ///XNA LOGIC HAPPENS. IT HAPPENS.
 }