Пример #1
0
 public override bool LoadContents()
 {
     _parManager.LoadContents(_contents);
     _background = _contents.Load <Texture2D>(@"map\background");
     map1.LoadContent(_contents);
     return(base.LoadContents());
 }
Пример #2
0
        public override bool LoadContents()
        {
            _parManager.LoadContents(_contents);
            _background = _contents.Load <Texture2D>(@"map\background");
            _map1.LoadContent(_contents);
            Controller ctrl = _network.GetController(Consts.CTRL_TANK);

            if (ctrl != null)
            {
                Dictionary <int, GameObject> tanks = ctrl.GetAllGameObject();
                foreach (GameObject tank in tanks.Values)
                {
                    tank.LoadContents(_contents);
                }
            }

            _deathCount.LoadContents(_contents);
            _deathCount.ChangeBackground(Consts.UIS_ICON_DEATH);
            _killCount.LoadContents(_contents);
            _killCount.ChangeBackground(Consts.UIS_ICON_KILL);

            // death state effect
            _deathBG  = _contents.Load <Texture2D>("d");
            _deathNum = _contents.Load <Texture2D>("number");

            _okButton.LoadContents(_contents);
            return(base.LoadContents());
        }