public GameWorld ChangeWorld(int world, int level, AbstractMarioPower power, HUDModel hud) { GameWorld g; SetModel(g = new GameWorld(world, level)); g.Init(power, hud); return(g); }
private void RenderHUD(HUDModel hud, Vec2d offset) { GL.PushMatrix(); GL.Translate(offset.X, offset.Y, 0); //undo offset foreach (HUDElement hel in hud.elements) { RenderRectangle(hel.GetPosition(INIT_RESOLUTION_WIDTH, INIT_RESOLUTION_HEIGHT), hel.GetCurrentTexture(), hel.GetDistance(), 1.0); } GL.PopMatrix(); }
public override void Init(AbstractMarioPower p, HUDModel hmod) { base.Init(p, hmod); if (hmod == null) { HUD = new StandardGameHUD(this); } else { HUD = hmod; } LoadMapFromResources(p); }
public Level1Model(UnderseaModel gameModel, TgcCamera camera, TgcD3dInput input, string mediaDir, string shadersDir, TgcFrustum frustum, TgcText2D drawText, TgcDirectSound directSound) : base(gameModel, camera, input, mediaDir, shadersDir, frustum, drawText) { hudModel = new HUDModel(MediaDir, D3DDevice.Instance.Device); initialLookAt = new TGCVector3(6000, 4120f, 6600f); initialPosition = new TGCVector3(6000, 4120f, 6600f); //Camara Camera = new FpsCamera(initialLookAt, Input); //Player playerModel = new PlayerModel(surfacePosition.Y, initialPosition, gameModel, Camera, input, mediaDir, shadersDir, frustum, drawText, directSound); //Collect Model collectModel = new CollectModel(gameModel, Camera, input, mediaDir, shadersDir, frustum, drawText, directSound); // History Model historyModel = new HistoryModel(gameModel, Camera, input, mediaDir, shadersDir, frustum, drawText); // You Win Model youWinModel = new YouWinModel(gameModel, Camera, input, mediaDir, shadersDir, frustum, drawText, directSound); }
void Awake() { hud = GetComponentInParent <HUDModel>(); previousCheck = false; }
public virtual void Init(AbstractMarioPower p, HUDModel hmod) { entityCache = new EntityCache(); HUD = hmod; }
void Start() { hud = GetComponentInParent <HUDModel>(); text = GetComponentInChildren <Text>(); }