예제 #1
0
    IEnumerator spawn()
    {
        while (running)
        {
            PlayerShipLaserView playerShipLaser = playerLaserPool.GetInstance();

            playerShipLaser.Reinit(
                playerShipModel.ShotSpawn.position,
                Quaternion.identity,
                laserParent
                );

            playerShipLaser.gameObject.AddComponent <OutOfScreenView>();

            swElement.Warrior.GetComponent <AudioSource>().Play();
            yield return(new WaitForSeconds(playerShipModel.FireRate));
        }
    }
 private void OnHitByLaser(EnemyShipView enemyShipView, PlayerShipLaserView playerShipLaserView, int health)
 {
     hitByLaserSigal.Dispatch(enemyShipView, playerShipLaserView, health);
 }
예제 #3
0
 private void OnHitByLaser(AsteroidView asteroidView, PlayerShipLaserView playerShipLaserView, int health)
 {
     asteroidHitByLaserSignal.Dispatch(asteroidView, playerShipLaserView, health);
 }