Beispiel #1
0
 public void Init(Vector2 dir)
 {
     _currentLife   = 0;
     _isAlive       = true;
     _moveDirection = dir;
     _healthComponent.RefillLive(GameEntityTag.UNKNOWN);
 }
Beispiel #2
0
        public void Init(Vector2 dir, AsteroidData asteroidData)
        {
            this.AsteroidData = asteroidData;
            _moveDirection    = dir;
            _moveSpeed        = Random.Range(asteroidData.minSpeed, asteroidData.maxSpeed);
            healthComponent.RefillLive(GameEntityTag.UNKNOWN);

            _currentVelocity = _moveDirection * _moveSpeed;
        }
Beispiel #3
0
 public void Init()
 {
     _entityHealthComponent.RefillLive(GameEntityTag.UNKNOWN);
 }