source: 2014/27/AleksanteriV/Protokolla236TrueSurvivor/Protokolla236TrueSurvivor/Protokolla236TrueSurvivor/Hud.cs @ 5446

Revision 5433, 881 bytes checked in by mijoilmo, 7 years ago (diff)
Line 
1using System;
2using System.Collections.Generic;
3using Jypeli;
4using Jypeli.Assets;
5using Jypeli.Controls;
6using Jypeli.Effects;
7using Jypeli.Widgets;
8
9class Hud : GameObject
10{
11    private Player boundPlayer;
12    private Radar radar;
13    public Hud(Proto236b parent)
14        : base(parent.GameScreen.Width / parent.Camera.ZoomFactor, parent.GameScreen.Height / parent.Camera.ZoomFactor)
15    {
16        this.boundPlayer = parent.Player;
17        this.IsUpdated = true;
18        this.IsVisible = false;
19        boundPlayer.Add(this);
20
21        radar = new Radar(parent);
22        radar.Bottom = this.Bottom + 20 / parent.Camera.ZoomFactor;
23        radar.Right = this.Right - 20 / parent.Camera.ZoomFactor;
24        Add(radar);
25    }
26    public override void Update(Time time)
27    {
28        this.AbsoluteAngle = Angle.Zero;
29        base.Update(time);
30    }
31}
Note: See TracBrowser for help on using the repository browser.