private void Reset()
 {
     if (gameEntityTagComponent == null)
     {
         gameEntityTagComponent = GetComponent <GameEntityTagComponent>();
     }
     if (healthComponent == null)
     {
         healthComponent = GetComponent <EntityHealthComponent>();
     }
 }
예제 #2
0
 private void Awake()
 {
     if (rb == null)
     {
         rb = GetComponent <Rigidbody2D>();
     }
     if (healthComponent == null)
     {
         healthComponent = GetComponent <EntityHealthComponent>();
     }
 }
예제 #3
0
 private void Awake()
 {
     if (rb == null)
     {
         rb = GetComponent <Rigidbody2D>();
     }
     if (_healthComponent == null)
     {
         _healthComponent = GetComponent <EntityHealthComponent>();
     }
     _multiplePrefabMemoryPool = DIResolver.GetObject <MultiplePrefabMemoryPool>();
     _gameSignals = DIResolver.GetObject <GameSignals>();
 }
예제 #4
0
 private void Awake()
 {
     if (_shipMovement == null)
     {
         _shipMovement = GetComponent <IShipMovement>();
     }
     if (_playerWeapon == null)
     {
         _playerWeapon = GetComponentInChildren <IWeapon>();
     }
     if (_hyperSpace == null)
     {
         _hyperSpace = GetComponent <IShipHyperSpace>();
     }
     if (_entityHealthComponent == null)
     {
         _entityHealthComponent = GetComponent <EntityHealthComponent>();
     }
 }