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; | |
using System.Collections.Generic; | |
using UnityEngine; | |
public class GridManager : MonoBehaviour { | |
[SerializeField] private int _width, _height; | |
[SerializeField] private Tile _tilePrefab; |
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 Turret : MonoBehaviour { | |
private Camera _cam; | |
[SerializeField,Range(1,100)] private float _rotationSpeed = 1; | |
[SerializeField] private Projectile _projectilePrefab; | |
[SerializeField] private Transform _spawnPoint; | |
void Awake() | |
{ | |
_cam = Camera.main; | |
} |
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 SaveManager : MonoBehaviour { | |
public static SaveData SaveData; | |
private static string SavePath => $"{Application.persistentDataPath}/save.game"; | |
private BinaryFormatter _formatter = new BinaryFormatter(); | |
void Start() { | |
Load(); | |
} |
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 NetworkManager : MonoBehaviour { | |
private void Start() { | |
StartCoroutine(MakeRequests()); | |
} | |
private IEnumerator MakeRequests() { | |
// GET | |
var getRequest = CreateRequest("https://jsonplaceholder.typicode.com/todos/1"); | |
yield return getRequest.SendWebRequest(); |
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 Dragger : MonoBehaviour { | |
private Vector3 _dragOffset; | |
private Camera _cam; | |
[SerializeField] private float _speed = 10; | |
void Awake() { |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
NewerOlder