Beispiel #1
0
        public BowheadHUD(ClientWorld world, GameState gameState) : base(world, gameState)
        {
            _equipHUD     = GameObject.Instantiate(GameManager.instance.clientData.hudEquipPrefab, hudCanvas.transform, false);
            _inventoryHUD = GameObject.Instantiate(GameManager.instance.clientData.hudInventoryPrefab, hudCanvas.transform, false);
            _interactHint = GameObject.Instantiate(GameManager.instance.clientData.hudButtonHintPrefab, hudCanvas.transform, false);
            _lockMarker   = GameObject.Instantiate(GameManager.instance.clientData.hudLockPrefab, hudCanvas.transform, false);
            _lockMarker.gameObject.SetActive(false);
            _worldmap = GameObject.Instantiate(GameManager.instance.clientData.worldMapPrefab, hudCanvas.transform, false);
            _compass  = GameObject.Instantiate(GameManager.instance.clientData.compassPrefab, hudCanvas.transform, false);

            _pawnHUDs = new GameObject("PawnHuds");
            _pawnHUDs.transform.parent = hudCanvas.transform;

            _playerHUD = new GameObject("PlayerHud");
            _playerHUD.transform.parent = worldHUDCanvas.transform;

            _worldmap.transform.SetAsLastSibling();             // keep world-map on top of everything.
            _worldmap.gameObject.SetActive(false);

            _inventoryHUD.transform.SetAsLastSibling();             // keep world-map on top of everything.
            _inventoryHUD.gameObject.SetActive(false);

            world.CritterActiveEvent     += OnCritterActive;
            world.DamageEvent            += OnDamage;
            world.StatusEffectAddedEvent += OnStatusEffectAdded;
        }