Inheritance: MonoBehaviour
Example #1
0
    void Awake()
    {
        fupixel = gameObject.GetComponent<Fupixel>();
        fupixel.ClearPixels(Color.black);
        stars = new Vector3[count];

        for(int i=0; i<stars.Length; i++)
            stars[i] = new Vector3(Random.Range(-xSize, xSize), Random.Range(-ySize, ySize), (float)(stars.Length - i) * maxZ / stars.Length + minZ);
    }
Example #2
0
    void Awake()
    {
        fupixel = gameObject.GetComponent <Fupixel>();
        fupixel.ClearPixels(Color.black);
        stars = new Vector3[count];

        for (int i = 0; i < stars.Length; i++)
        {
            stars[i] = new Vector3(Random.Range(-xSize, xSize), Random.Range(-ySize, ySize), (float)(stars.Length - i) * maxZ / stars.Length + minZ);
        }
    }
Example #3
0
 void Awake()
 {
     fupixel = gameObject.GetComponent <Fupixel>();
     fupixel.ClearPixels(Color.black);
     snakeParts = new Queue <int>();
     snakeX     = fupixel.width / 2;
     snakeY     = fupixel.height / 4;
     foodIndex  = fupixel.GetIndex(snakeX, fupixel.height / 2);
     snakeParts.Enqueue(fupixel.GetIndex(snakeX, snakeY));
     DrawWalls();
 }
Example #4
0
 void Awake()
 {
     fupixel = gameObject.GetComponent<Fupixel>();
     fupixel.ClearPixels(Color.black);
     snakeParts = new Queue<int>();
     snakeX = fupixel.width / 2;
     snakeY = fupixel.height / 4;
     foodIndex = fupixel.GetIndex(snakeX, fupixel.height / 2);
     snakeParts.Enqueue(fupixel.GetIndex(snakeX, snakeY));
     DrawWalls();
 }
Example #5
0
 // Use this for initialization
 void Start()
 {
     fupixel = gameObject.GetComponent<Fupixel>();
     fupixel.ClearPixels(Color.black);
     fupixel.SetPixel(10, 10, Color.red);
 }
Example #6
0
 // Use this for initialization
 void Start()
 {
     fupixel = gameObject.GetComponent <Fupixel>();
     fupixel.ClearPixels(Color.black);
     fupixel.SetPixel(10, 10, Color.red);
 }