private void Start()
    {
        _pickController = FindObjectOfType <PickController>();
        Debug.Assert(_settings != null, "Settings not set");

        _occupiedSpots = new bool[_settings.numberOfUnits];
    }
示例#2
0
    public void Enter()
    {
        //_AnimController = GameObject.Find("Animal").GetComponent<AnimalController>();
        _AnimController = GameObject.FindWithTag("Animal").GetComponent <AnimalController>();

        _PickController = GameObject.Find("Picker").GetComponent <PickController>();

        _AnimController.OnFinishGame = OnFinish;
    }
    // Start is called before the first frame update
    void Start()
    {
        if (Instance == null)
        {
            Instance = this;
        }

        _camera             = Camera.main;
        _rb2d               = GetComponent <Rigidbody2D>();
        _defaultRotation    = transform.rotation;
        _defaultCamRotation = _camera.transform.rotation;

        for (int i = 0; i < levelHolder.transform.childCount; i++)
        {
            levels.Add(levelHolder.transform.GetChild(i).gameObject);
        }
    }