Beispiel #1
0
 // Use this for initialization
 void Start()
 {
     uiManager  = FindObjectOfType <UI_Manager>();
     enemyId    = Convert.ToInt32(enemyTypes);
     enemyName  = PersistentManager.getEnemyName(enemyId);
     speed      = PersistentManager.getEnemySpeed(enemyId);
     health     = PersistentManager.getEnemyHealth(enemyId);
     damage     = PersistentManager.getEnemyDamage(enemyId);
     rb         = GetComponent <Rigidbody2D>();
     explosion  = Resources.Load("Prefabs/Explosion") as GameObject;
     powerUp[0] = Resources.Load("Prefabs/PowerUp_Shield") as GameObject;
     powerUp[1] = Resources.Load("Prefabs/PowerUp_Supernova") as GameObject;
     powerUp[2] = Resources.Load("Prefabs/PowerUp_TimeDilation") as GameObject;
     powerUp[3] = Resources.Load("Prefabs/Upgrade_Defensive") as GameObject;
     powerUp[4] = Resources.Load("Prefabs/Upgrade_Offensive") as GameObject;
 }