コード例 #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));
        }
    }
コード例 #2
0
 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);
 }