-
Notifications
You must be signed in to change notification settings - Fork 0
/
GameMgr.cs
45 lines (41 loc) · 1.26 KB
/
GameMgr.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class GameMgr : MonoBehaviour
{
public static GameMgr inst;
private void Awake()
{
inst = this;
}
// Start is called before the first frame update
void Start()
{
Vector3 position;
foreach(GameObject go in EntityMgr.inst.entityPrefabs)
{
position = Random.insideUnitSphere * 2000;
position.y = 0;
position.z += 1950;
Entity381 ent = EntityMgr.inst.CreateEntity(go.GetComponent<Entity381>().entityType, position, Vector3.zero);
}
}
public Vector3 position;
public float spread = 20;
public float colNum = 10;
// Update is called once per frame
void Update()
{
if (Input.GetKeyUp(KeyCode.F12)) {
for (int i = 0; i < 10; i++) {
for (int j = 0; j < 10; j++) {
Entity381 ent = EntityMgr.inst.CreateEntity(EntityType.PilotVessel, position, Vector3.zero);
position.z += spread;
}
position.x += spread;
position.z = 0;
}
DistanceMgr.inst.Initialize();
}
}
}