private void Awake() { beet = FindObjectOfType <BeetMovement>(); board = new GameObject[rows, cols]; GenerateGrid(); //Debug.Log("awake"); }
// Start is called before the first frame update void Start() { beet = FindObjectOfType <BeetMovement>(); ui = FindObjectOfType <UI>(); startStatus = currentStatus; startLocation = transform.position; speed = Mathf.Min(speed, beet.GetSpeed() - 0.1f); _anim = GetComponentInChildren <Animator>(); _rend = GetComponentInChildren <SpriteRenderer>(); }
private void Awake() { if (FindObjectOfType <Options>()) { option = FindObjectOfType <Options>(); rows = option.GetRows(); cols = option.GetRows(); } beet = FindObjectOfType <BeetMovement>(); board = new GameObject[rows, cols]; GenerateGrid(); }