private void CreateHud() { _statusHud = new StatusHud(Engine); _healthHud = new HealthHud(Engine); _itemUsageHud = new ItemUsageHud(Engine); _timeOfDay = new TimeOfDayHud(Context.GameClient); _chatboxHud = new ChatboxHud(Context.GameClient); _containerHud = new ContainerHud(Context.GameClient); _actionHud = new ActionHud(); }
void Awake() { float sc_h = Screen.height / GameControl.BASE_HEIGHT; inst = this; float height = Screen.height; max_width = 256 * sc_h; hud_area = new Rect(0 * sc_h, height - 96 * sc_h, max_width, 32 * sc_h); hud_area2 = new Rect(256 * sc_h, height - 96 * sc_h, 0 * sc_h, 32 * sc_h); hud_health = new Rect(0 * sc_h, 0 * sc_h, 256 * sc_h, 32 * sc_h); hud_health2 = new Rect(0 * sc_h, 0 * sc_h, 256 * sc_h, 32 * sc_h); SetValue(100); }
void Start() { Hudreference = HealthHud.GetComponent <HealthHud> (); }