Nextrek
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
|
using UnityEngine;
using System.Collections;
public class GameManager : MonoBehaviour
{
public static GameManager Instance;
public Transform[] spaceShipPrefebs;
public Transform spaceShip;
public Transform explosionEffect;
void Awake()
{
Instance = this;
spaceShip = Instantiate(spaceShipPrefebs[GlobalObject.Instance.shipType],Vector3.zero,Quaternion.identity)as Transform;
spaceShip.name = "Ally";
//spaceShip.transform.tag = "Ally";
}
void Start()
{
}
// Update is called once per frame
void Update ()
{
if(Input.GetKey(KeyCode.Escape))
{
Application.Quit();
}
}
}
|