Пример #1
0
 private void Start()
 {
     uiManager       = FindObjectOfType <UI_Manager>();
     asteroidId      = Convert.ToInt32(asteroidTypes);
     asteroidName    = PersistentManager.getAsteroidName(asteroidId);
     speed           = PersistentManager.getAsteroidSpeed(asteroidId);
     health          = PersistentManager.getAsteroidHealth(asteroidId);
     damage          = PersistentManager.getAsteroidDamage(asteroidId);
     rb              = GetComponent <Rigidbody2D>();
     explosion       = Resources.Load("Prefabs/Exploding_Asteroid") as GameObject;
     splittingObject = Resources.Load("Prefabs/Asteroid_Small") as GameObject;
 }