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.Generic; | |
| using System.Linq; | |
| using UnityEngine; | |
| using Random = System.Random; | |
| // This source code is used for the video. It obviously requires heavy alterations to be used in a real project. | |
| public class ExampleGrid : MonoBehaviour | |
| { | |
| [SerializeField] private Vector2Int _size; | |
| [SerializeField] private Vector2 _gap; |
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 Newtonsoft.Json; | |
| using System.Collections.Generic; | |
| using System.Linq; | |
| using System.Threading.Tasks; | |
| using Unity.Services.CloudSave; | |
| using UnityEngine; | |
| public class CloudSaveClient : ISaveClient | |
| { | |
| private readonly ICloudSaveDataClient _client = CloudSaveService.Instance.Data; |
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; | |
| using UnityEngine; | |
| using UnityEngine.Tilemaps; | |
| using Random = UnityEngine.Random; | |
| public class PlayerAnimator : MonoBehaviour { | |
| [SerializeField] private float _minImpactForce = 20; | |
| // Anim times can be gathered from the state itself, but | |
| // for the simplicity of the video... |
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
| public class PlayerController : MonoBehaviour { | |
| [SerializeField] private Rigidbody _rb; | |
| [SerializeField] private float _speed = 5; | |
| [SerializeField] private float _turnSpeed = 360; | |
| private Vector3 _input; | |
| private void Update() { | |
| GatherInput(); | |
| Look(); | |
| } |
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; | |
| using System.Collections.Generic; | |
| using System.IO; | |
| using System.Linq; | |
| using Newtonsoft.Json; | |
| using Newtonsoft.Json.Serialization; | |
| using UnityEngine; | |
| public class JsonSerialisableScriptableObject<T> : ScriptableObject where T : JsonSerialisableScriptableObject<T> | |
| { |