Beispiel #1
0
 void Awake()
 {
     if (instance == null)
         instance = this;
     else if (instance != null)
         Destroy(this);
 }
 // Use this for initialization
 void Start()
 {
     //rb2d = GetComponent<Rigidbody2D>();
     shields = transform.GetChild(0);
     startingRotation = shields.transform.rotation;
     pool = GetComponent<PlayerBulletPool>();
     ammoGUI = FindObjectOfType(typeof (AmmoGUIScript)) as AmmoGUIScript;
     energyBar = FindObjectOfType(typeof(EnergyBarScript)) as EnergyBarScript;
     actualAmmo = ammoCount;
 }