private void Reset() { if (gameEntityTagComponent == null) { gameEntityTagComponent = GetComponent <GameEntityTagComponent>(); } if (healthComponent == null) { healthComponent = GetComponent <EntityHealthComponent>(); } }
private void Awake() { if (rb == null) { rb = GetComponent <Rigidbody2D>(); } if (healthComponent == null) { healthComponent = GetComponent <EntityHealthComponent>(); } }
private void Awake() { if (rb == null) { rb = GetComponent <Rigidbody2D>(); } if (_healthComponent == null) { _healthComponent = GetComponent <EntityHealthComponent>(); } _multiplePrefabMemoryPool = DIResolver.GetObject <MultiplePrefabMemoryPool>(); _gameSignals = DIResolver.GetObject <GameSignals>(); }
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>(); } }