예제 #1
0
 public override void PerformCustomMechanic(DefaultEnemyScript enemy)
 {
     spawnPosition.ForEach(spawnTransform =>
     {
         var spawnedEnemy = LeanPool.Spawn(enemyToSpawn, spawnTransform.position, Quaternion.identity);
         spawnedEnemy.Initiate(false);
     }
                           );
 }
예제 #2
0
 public override void PerformCustomMechanic(DefaultEnemyScript enemy)
 {
     if (!_cameBack)
     {
         _previousLocation.x = Random.Range(-0.5f, 0.5f);
         _previousLocation.y = Random.Range(-0.5f, 0.5f);
         _cameBack           = true;
     }
     else
     {
         _previousLocation.x *= -1.0f;
         _previousLocation.y *= -1.0f;
         _cameBack            = false;
     }
     enemy.transform.DOMove(_previousLocation, 1.0f);
 }
예제 #3
0
 public override void PerformCustomMechanic(DefaultEnemyScript enemy)
 {
     _currentRotation += rotationPerCall;
     transform.DOLocalRotate(new Vector3(0.0f, 0.0f, _currentRotation), 0.1f)
     .OnComplete(enemy.PerformSimpleAttack);
 }
 public virtual void PerformCustomMechanic(DefaultEnemyScript enemy)
 {
 }