示例#1
0
        protected override void SetInitialValues()
        {
            _animatorVariables = new PlayerAnimatorVariables();
            _cinemachine       = GameObject.FindObjectOfType <CinemachineVirtualCamera>();
            _uIManager         = GameObject.FindObjectOfType <UIManager>();
            _playerStateManage = GameObject.FindObjectOfType <PlayerStateManager>();
            _activePlayerUI    = GameObject.FindObjectOfType <ActivePlayersUIComponent>();
            _animator          = this.GetComponent <Animator>();
            _audioComponent    = this.GetComponent <AudioComponent>();

            _damageDealerComponent = this.GetComponent <DamageDealerComponent>();
            _damageTakerComponent  = this.GetComponent <DamageTakerComponent>();

            _miniMapComponent = GameObject.FindObjectOfType <MiniMapComponent>();


            if (_canMoveByClick)
            {
                _movementMouseComponent = this.GetComponent <MovementMouseComponent>();
            }
            if (_canInteract)
            {
                _interactableComponent = this.GetComponent <InteractableComponent>();
            }
            if (_canPoop)
            {
                _stomachComponent = this.GetComponent <StomachComponent>();
            }
        }
示例#2
0
 protected override void SetInitialValues()
 {
     Coordinates       = new Vector2();
     _mapManager       = GameObject.FindObjectOfType <MapManager>();
     _spawnPointList   = this.GetComponentsInChildren <MapSpawnComponent>().ToList();
     _miniMapComponent = GameObject.FindObjectOfType <MiniMapComponent>();
     _mobList          = new List <int>();
 }
示例#3
0
            public static EntityBuilder <MiniMap> Minimap(List <Tile[, ]> layers)
            {
                var minimap = new MiniMapComponent()
                              .SetRenderLayer(Constants.RenderLayerScreenSpace) as MiniMapComponent;

                minimap.Build(layers);

                return(new EntityBuilder <MiniMap>()
                       .With(minimap));
            }