123456789101112131415161718192021222324252627 |
- using System.Collections;
- using System.Collections.Generic;
- using UnityEngine;
- public class LevelPart : MonoBehaviour
- {
- [SerializeField]
- private Vector3 _size;
- [SerializeField]
- private GameObject _tower;
- [SerializeField]
- private Transform _cameraFinish;
- [SerializeField]
- private Animator _animator;
- public Transform camFinish => _cameraFinish;
- public Animator princessAnimator => _animator;
- public void SetIndex(int index, bool tower)
- {
- _tower.SetActive(tower);
- transform.position = _size * index;
- gameObject.SetActive(true);
- }
- }
|