Exemple #1
0
 private void Start()
 {
     //constructor for accessing AsteroidsScrip
     //THis needs to be edited
     //cannot access AsteroidsScript
     asteroid_SO = new AsteroidsScriptableObject();
 }
Exemple #2
0
 private void Awake()
 {
     asteroidSO       = FindObjectOfType <AsteraX>().asteroidsSO;
     scoreManager     = FindObjectOfType <ScoreManager>();
     rigid            = GetComponent <Rigidbody>();
     offScreenWrapper = GetComponent <OffScreenWrapper>();
 }
Exemple #3
0
    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;
 }
Exemple #5
0
    static public AsteroidsScriptableObject S; // This Scriptable Object is an unprotected Singleton

    public AsteroidsScriptableObject()
    {
        S = this; // Assign the Singleton as part of the constructor.
    }