Wave system
This commit is contained in:
parent
ca2f1f48c0
commit
5524ac7365
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -11,6 +11,8 @@ public class DayManager : MonoBehaviour
|
||||
public AudioClip dayClip;
|
||||
public AudioClip nigtClip;
|
||||
|
||||
public int daySurvived = 0;
|
||||
|
||||
// Start is called before the first frame update
|
||||
void Start()
|
||||
{
|
||||
@ -35,6 +37,7 @@ public class DayManager : MonoBehaviour
|
||||
Debug.Log("It is a Day");
|
||||
mainSource.PlayOneShot(dayClip);
|
||||
night = false;
|
||||
daySurvived++;
|
||||
}
|
||||
|
||||
this.gameObject.transform.Rotate(new Vector3(sunSpeed * Time.deltaTime, 0, 0));
|
||||
|
11
Assets/Scripts/MusicManager.cs.meta
Normal file
11
Assets/Scripts/MusicManager.cs.meta
Normal file
@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 41e45d644c0cd4b4a8133c39c3ebcfa8
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -7,9 +7,10 @@ public class SpawnManager : MonoBehaviour
|
||||
|
||||
public List<GameObject> enemyList = new List<GameObject>();
|
||||
public List<Transform> spawnPoints = new List<Transform>();
|
||||
public int enemyNumber = 10;
|
||||
public int enemyStartNumber = 5;
|
||||
public GameObject Sun = new GameObject();
|
||||
|
||||
|
||||
bool night = false;
|
||||
bool alreadySpawn = false;
|
||||
|
||||
@ -22,6 +23,7 @@ public class SpawnManager : MonoBehaviour
|
||||
// Update is called once per frame
|
||||
void Update()
|
||||
{
|
||||
int enemyNumber = enemyStartNumber + (Sun.GetComponent<DayManager>().daySurvived * enemyStartNumber);
|
||||
float sunRotationX = Sun.transform.localEulerAngles.x;
|
||||
sunRotationX = (sunRotationX > 180) ? sunRotationX - 360 : sunRotationX;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user