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>();
     }
 }