Beispiel #1
0
    public void GetCat()
    {
        heldCat             = spawnerComponent.SpawnCat(index);
        joint               = heldCat.gameObject.AddComponent <FixedJoint>();
        joint.connectedBody = GetComponent <Rigidbody>();

        // set the skin of the cat thought to match the actual cat
        catThought.materials = new Material[] { heldCat.GetComponent <Cat>().CatSkins[heldCat.CatType], heldCat.GetComponent <Cat>().Faces[1] };
    }
    public void Advert()
    {
        _tapsCount++;

        if (_tapsCount >= _requiredTapsCount)
        {
            _tapsCount = 0;
            _spawner.SpawnCat(_catsPrefabs[Random.Range(0, _catsPrefabs.Length)], _spawnPoint);
        }

        _slider.value = _tapsCount;
    }