public CInfoGameSceneBase(Game1 game)
 {
     this.game = game;
     listButton = new List<CBusiButton>();
     cglobalVar = game.cglobalVar;
     cglobalFunc = game.cglobalFunc;
     cglobalDic = game.cglobalDic;
 }
 public CInfoGameSceneBase(Game1 game, CBusiBackground background)
 {
     this.background = background;
     isVisible = false;
     listButton = new List<CBusiButton>();
     this.game = game;
     cglobalVar = game.cglobalVar;
     cglobalFunc = game.cglobalFunc;
     cglobalDic = game.cglobalDic;
 }
 /// <summary>
 /// phương thức khởi tạo màn hình 
 /// </summary>
 /// <param name="listButton">danh sách button</param>
 /// <param name="background">đối tượng hình nền</param>
 /// <param name="cglobalVar">đối tượng biến toàn cục</param>
 /// <param name="isVisible">cho phép ẩn hiện</param>
 /// <param name="game">đối tượng game</param>
 /// <param name="cglobalFunc">đối tượng hàm toàn cục</param>
 /// <param name="cglobalDic">đối tượng dictionnary toàn cục</param>
 public CInfoGameSceneBase(List<CBusiButton> listButton, CBusiBackground background, CGlobalVariable cglobalVar, bool isVisible, Game1 game, CGloabalFunction cglobalFunc, CGlobalDictionary cglobalDic)
 {
     this.listButton = listButton;
     this.background = background;
     this.cglobalVar = cglobalVar;
     this.isVisible = isVisible;
     this.game = game;
     this.cglobalFunc = cglobalFunc;
     this.cglobalDic = cglobalDic;
 }
Пример #4
0
        protected override void LoadContent()
        {
            //khơi tạo đối tượng toàn cục
            cglobalVar = new CGlobalVariable(Content);
            cglobalFunc = new CGloabalFunction();
            cglobalDic = new CGlobalDictionary(this);
            cglobalItem = new CGlobalItem(this);

            spriteBatch = new SpriteBatch(GraphicsDevice);
            gameSceneManager = new CBusiGameSceneManager(this);
            skinCursor = Content.Load<Texture2D>("Images/global/cursor");
        }
Пример #5
0
 /// <summary>
 /// phương thức khởi tạo màn chơi
 /// </summary>
 /// <param name="listEnemy">danh sách quái</param>
 /// <param name="player">đối tượng người chơi</param>
 /// <param name="timeAddEnemy"> time thêm quái</param>
 /// <param name="timerEnemy">biến đếm time thêm quái</param>
 /// <param name="maxEnemy">số quái tối đa</param>
 /// <param name="listItem">danh sách item</param>
 /// <param name="timeAddItem">thời gian thêm item</param>
 /// <param name="timerItem">biến đếm time thêm item</param>
 /// <param name="maxItem">số item tối đa</param>
 /// <param name="listButton">danh sách button</param>
 /// <param name="background"> đối tượng hình nền</param>
 /// <param name="cglobalVar"> đối tượng biến toàn cục</param>
 /// <param name="isVisible">cho phép ẩn hiện</param>
 /// <param name="game">đối tượng game</param>
 /// <param name="cglobalFunc">đối tượng hàm toàn cục</param>
 /// <param name="cglobalDic">đối tượng dictionnary toàn cục</param>
 public CInfoLevelBase(List<CBusiEnemy> listEnemy, CBusiPlayer player, int timeAddEnemy, int timerEnemy, int maxEnemy, List<CBusiItem> listItem, int timeAddItem, int timerItem, int maxItem, List<CBusiButton> listButton, CBusiBackground background, CGlobalVariable cglobalVar, bool isVisible, Game1 game, CGloabalFunction cglobalFunc, CGlobalDictionary cglobalDic)
     : base(listButton, background, cglobalVar, isVisible, game, cglobalFunc, cglobalDic)
 {
     this.listEnemy = listEnemy;
     this.player = player;
     this.timeAddEnemy = timeAddEnemy;
     this.timerEnemy = timerEnemy;
     this.maxEnemy = maxEnemy;
     this.listItem = listItem;
     this.timeAddEnemy = timeAddEnemy;
     this.timerItem = timerItem;
     this.maxItem = maxItem;
 }
Пример #6
0
 public CInfoGameObject(Game1 game, string skinName, Vector2 position, int speed, int damage)
 {
     this.visible = true;
     this.position = position;
     this.speed = speed;
     this.damage = damage;
     this.skinName = skinName;
     //this.bound = new Rectangle((int)position.X, (int)position.Y, skin.Width, skin.Height);
     this.game = game;
     font = game.Content.Load<SpriteFont>("Font/fontMain");
     cglobalVar = game.cglobalVar;
     cglobalDic = game.cglobalDic;
     cglobalFunc = game.cglobalFunc;
 }
Пример #7
0
 /// <summary>
 /// phương thức khởi tạo game
 /// </summary>
 /// <param name="skin">hình ảnh đối tượng</param>
 /// <param name="position">vị trí</param>
 /// <param name="bound">bao quanh đối tượng</param>
 /// <param name="speed">tốc độ</param>
 /// <param name="hp">máu của đối tượng</param>
 /// <param name="damage">mức sát thương</param>
 /// <param name="visible">thuộc tính ẩn hiện</param>
 /// <param name="game">đối tượng game</param>
 /// <param name="cglobal">đối tượng toàn cục</param>
 /// <param name="font">đối tượng chữ</param>
 public CInfoGameObject(Game1 game, Texture2D skin, Vector2 position, Rectangle bound, int speed, int hp, int damage, bool visible)
 {
     this.skin = skin;
     this.position = position;
     this.bound = bound;
     this.speed = speed;
     this.hp = hp;
     this.damage = damage;
     this.visible = visible;
     this.game = game;
     font = game.Content.Load<SpriteFont>("Font/fontMain");
     cglobalVar = game.cglobalVar;
     cglobalDic = game.cglobalDic;
     cglobalFunc = game.cglobalFunc;
 }
 public CInfoGameSceneBase()
 {
     cglobalVar = game.cglobalVar;
     cglobalFunc = game.cglobalFunc;
     cglobalDic = game.cglobalDic;
 }