private void Start() { //constructor for accessing AsteroidsScrip //THis needs to be edited //cannot access AsteroidsScript asteroid_SO = new AsteroidsScriptableObject(); }
private void Awake() { asteroidSO = FindObjectOfType <AsteraX>().asteroidsSO; scoreManager = FindObjectOfType <ScoreManager>(); rigid = GetComponent <Rigidbody>(); offScreenWrapper = GetComponent <OffScreenWrapper>(); }
void Start() { #if DEBUG_AsteraX_LogMethods Debug.Log("AsteraX:Start()"); #endif //determine which asteriod scriptable object to use. if (Application.platform == RuntimePlatform.IPhonePlayer || Application.platform == RuntimePlatform.Android) { asteroidsSO = asteroidsSO_Mobile; } else { asteroidsSO = asteroidsSO_PC; } // Register RemoteSettingsUpdated() to be called whenever RemoteSettings is updated. RemoteSettings.Updated += RemoteSettingsUpdated; ParseLevelProgression(); ASTEROIDS = new List <Asteroid>(); AddScore(0); SaveGameManager.Load(); }
public AsteroidsScriptableObject() { S = this; }
static public AsteroidsScriptableObject S; // This Scriptable Object is an unprotected Singleton public AsteroidsScriptableObject() { S = this; // Assign the Singleton as part of the constructor. }