コード例 #1
0
ファイル: Game1.cs プロジェクト: splateaux/OutOfOffice
 /// <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);
     _breakroom   = new Breakroom(Services, graphics.GraphicsDevice, "McB");
     //_runner = new MazeRunner(this, Content.Load<Texture2D>("Textures/Hero"), _maze);
 }
コード例 #2
0
        /// <summary>
        /// Constructs a new can.
        /// </summary>
        public SodaCan(Vector2 startPosition, Breakroom breakroom, Brand brand)
        {
            _position      = startPosition;
            _breakroom     = breakroom;
            this._isActive = true;

            LoadContent();
        }
コード例 #3
0
ファイル: MiniPlayer.cs プロジェクト: splateaux/OutOfOffice
        public MiniPlayer(Breakroom breakroom, Vector2 startPosition, String name)
        {
            _breakroom = breakroom;
            _position  = startPosition;
            _name      = name;

            LoadContent();
        }
コード例 #4
0
ファイル: FridgeRack.cs プロジェクト: splateaux/OutOfOffice
        /// <summary>
        /// Constructs a rack to hold cand
        /// </summary>
        public FridgeRack(Vector2 startPosition, Breakroom breakroom, SodaCan.Brand rackType)
        {
            _position            = startPosition;
            _rackSodaBrand       = rackType;
            _breakroom           = breakroom;
            _relativeBoundingBox = new Rectangle(0, 0, 77, 137);

            LoadContent();
        }
コード例 #5
0
        public SodaCan(Vector2 startPosition, Breakroom breakroom)
        {
            Random random = new Random();

            _position  = startPosition;
            _breakroom = breakroom;
            _brand     =

                Enum.GetValues(typeof(Brand))
                .Cast <Brand>()
                .OrderBy(x => random.Next())
                .FirstOrDefault();

            LoadContent();
        }