Пример #1
0
 void hardDeactivate()
 {
     if (laserShotController)
     {
         laserShotController.destroy();
         playerController.processAbility(this, false);
         laserShotController = null;
     }
 }
Пример #2
0
 void activate()
 {
     laserShotController = objectSpawner.spawnObject <LaserShotController>(
         laserIndex,
         playerController.SpawnCenter,
         playerController.LookDirection.normalized
         );
     updateLaser();
 }
Пример #3
0
 void release()
 {
     laserShotController.setReadyToFire(true);
     playerMovement.forceMovement(Vector2.zero);
     laserShotController.onLaserEnded += () =>
     {
         playerMovement.forceMovement(false);
         laserShotController = null;
         playerController.processAbility(this, false);
     };
     playerController.processAbility(this, true);
 }