void Start()
    {
        material   = GetComponent <Renderer>().material;
        manager    = GetComponentInParent <SandManager>();
        myRenderer = GetComponent <Renderer>();

        x = (int)transform.position.x;
        y = (int)transform.position.y;
        z = (int)transform.position.z;
    }
Example #2
0
 void Awake()
 {
     if (instance == null)
     {
         instance = this;
     }
     else if (instance != this)
     {
         Destroy(this);
     }
     DontDestroyOnLoad(this);
 }
Example #3
0
    void Awake()
    {
        if (instance == null)
        {
            instance = this;
        }
        else if (instance != this)
        {
            Destroy(this);
        }
        DontDestroyOnLoad(this);

        BigList.AddRange(new List <GameObject>[] { littleSand, mediumSand, highSand, extremeSand });
    }