This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
public class Mover : MonoBehaviour | |
{ | |
[SerializeField] private Transform[] _wayPoints; | |
[SerializeField] private float _speed = 0; | |
private int _pointIndex = 0; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
public class Mover : MonoBehaviour | |
{ | |
[SerializeField] private Transform[] Places; | |
private float _speed; | |
private int _numberOfPlace = 0; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
public class GoPlaces : MonoBehaviour | |
{ | |
private float _speed; | |
private int _numberOfPlace; | |
public Transform AllPlaces; | |
Transform[] Places; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
public class PlayerMoverment : MonoBehaviour | |
{ | |
private const string Horizontal = nameof(Horizontal); | |
private const string Vertical = nameof(Vertical); | |
[SerializeField] private float _rotateSpeed; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
[RequireComponent(typeof(Rigidbody))] | |
public class ChestOpener : MonoBehaviour | |
{ | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
public class ChestOpenTrigger : MonoBehaviour | |
{ | |
[SerializeField] private Chest _chest; | |
private bool _isOpened = false; | |
private bool _hasOpener; | |
private void OnTriggerEnter(Collider other) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
public class Chest : MonoBehaviour | |
{ | |
private readonly int OpenTrigger = Animator.StringToHash("Open"); | |
[SerializeField] private Animator _animator; |