Advertisement
Placido_GDD

GridManager

Jan 6th, 2022
979
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.90 KB | None | 0 0
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4.  
  5. public class GridManager : MonoBehaviour
  6. {
  7.     public GameObject PopManager;
  8.     public int aliveChance;
  9.     public float speed;
  10.     public bool simEnabled = true;
  11.     public List<GameObject> gridSquares = new List<GameObject>();
  12.     public Cell[,] cellgrid = new Cell[Screen_Width, Screen_Height];
  13.     public Color CellAliveColorVal;
  14.     public Color CellDeadColorVal;
  15.     public int ScreenWidth;
  16.     public int ScreenHeight;
  17.     //
  18.     //
  19.     public float refreshRate;
  20.     private static int Screen_Width = 64; //1024 pixels
  21.     private static int Screen_Height = 48; //768 pixels
  22.  
  23.     void Start()
  24.     {
  25.         ScreenWidth = Screen_Width;
  26.         ScreenHeight = Screen_Height;
  27.     }
  28.  
  29.     // Update is called once per frame
  30.     void Update()
  31.     {
  32.         refreshRate = speed * 0.01f;
  33.     }
  34.  
  35.    
  36. }
  37.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement