Skip to content

Instantly share code, notes, and snippets.

View talatari's full-sized avatar
🚀
Learn C# & Unity

Tsaplin Sergey talatari

🚀
Learn C# & Unity
View GitHub Profile
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;
@talatari
talatari / BuildDisplayer.cs
Last active January 5, 2024 08:18 — forked from llamacademy/BuildDisplayer.cs
Build Incrementor Scripts from https://www.youtube.com/watch?v=PbFE0m9UMtE. If you get value from LlamAcademy, consider becoming a Patreon supporter at https://www.patreon.com/llamacademy
using UnityEngine;
using TMPro;
public class BuildDisplayer : MonoBehaviour
{
[SerializeField] private TMP_Text _textBuildNumber;
private void Awake()
{
if (_textBuildNumber.TryGetComponent(out TMP_Text textBuildLabel))
@talatari
talatari / FlyCamera.cs
Last active November 14, 2023 07:46 — forked from WISEPLAT/FlyCamera.cs
Unity Script to give camera WASD + mouse control
using UnityEngine;
public class FlyCamera : MonoBehaviour
{
private float _mainSpeed = 100.0f;
private float _shiftAdd = 250.0f;
private float _maxShift = 1000.0f;
private float _camSens = 0.25f;
private float _totalRun = 1.0f;
private Vector3 _lastMouse = new (255, 255, 255);