Skip to content

Instantly share code, notes, and snippets.

View JohnnyTurbo's full-sized avatar
🔥
Taking the Hot Path

Johnny Thompson JohnnyTurbo

🔥
Taking the Hot Path
View GitHub Profile
@JohnnyTurbo
JohnnyTurbo / CameraTargetSingleton.cs
Created March 12, 2025 14:32
Scripts from tutorial: Tutorial: SURVIVORS-LIKE w/ Unity DOTS & ECS - https://youtu.be/cc5l66FwpQ4
using UnityEngine;
namespace TMG.Survivors
{
public class CameraTargetSingleton : MonoBehaviour
{
public static CameraTargetSingleton Instance;
public void Awake()
{
@JohnnyTurbo
JohnnyTurbo / IJEBattleController.cs
Created April 29, 2022 05:23
Code used in [Topic Name] tutorial video on the Turbo Makes Games YouTube Channel - https://youtu.be/WgAKAMJOnMc
using TMPro;
using Unity.Entities;
using UnityEngine;
namespace TMG.IJE
{
public class IJEBattleController : MonoBehaviour
{
[SerializeField] private TMP_Dropdown _effectTypeDropdown;
[SerializeField] private TMP_Dropdown _teamSelectDropdown;
@JohnnyTurbo
JohnnyTurbo / ColorChangerSystem.cs
Created February 9, 2022 06:24
Code used in Material Property Overrides tutorial video on the Turbo Makes Games YouTube Channel - https://youtu.be/XMRSNlTYHFY
using Unity.Entities;
using Unity.Mathematics;
using Unity.Rendering;
using Unity.Transforms;
using UnityEngine;
namespace TMG.MaterialPropertyOverrides
{
public class ColorChangerSystem : SystemBase
{
@JohnnyTurbo
JohnnyTurbo / PlayerControlData.cs
Created January 14, 2022 05:39
Code used in ECS Job Dependencies tutorial video on the Turbo Makes Games YouTube Channel - https://youtu.be/u2D2vuBGyPQ
using Unity.Entities;
using UnityEngine;
namespace TMG.JobDependencies
{
[GenerateAuthoringComponent]
public struct PlayerControlData : IComponentData
{
public KeyCode ForwardKey;
public KeyCode LeftRotationKey;
@JohnnyTurbo
JohnnyTurbo / CollisionLayers.cs
Last active September 2, 2024 02:26
Code used in ECS Single Unit Selection tutorial video on the Turbo Makes Games YouTube Channel - https://youtu.be/x8pVhWCewjU
using System;
namespace TMG.UnitSelection
{
[Flags]
public enum CollisionLayers
{
Selection = 1 << 0,
Ground = 1 << 1,
Units = 1 << 2
@JohnnyTurbo
JohnnyTurbo / CapsuleTag.cs
Created October 31, 2021 13:29
Code used in System Lifecycle tutorial video on the Turbo Makes Games YouTube Channel - https://youtu.be/pViD_h8NXf0
using Unity.Entities;
namespace TMG.SystemLifecycle
{
[GenerateAuthoringComponent]
public struct CapsuleTag : IComponentData {}
}
@JohnnyTurbo
JohnnyTurbo / CapsuleMoveData.cs
Last active October 29, 2021 05:38
Code used in System State Components tutorial video on the Turbo Makes Games YouTube Channel - https://youtu.be/5iyk1GJinRU
using Unity.Entities;
namespace TMG.SystemStateComponents
{
[GenerateAuthoringComponent]
public struct CapsuleMoveData : IComponentData
{
public float Speed;
public float TimeAlive;
public float TimeToLive;
@JohnnyTurbo
JohnnyTurbo / CommanderTag.cs
Created October 22, 2021 12:48
Code used in Entity Queries tutorial video on the Turbo Makes Games YouTube Channel - https://youtu.be/7GDpzTnFe90
using Unity.Entities;
namespace TMG.EntityQueries
{
[GenerateAuthoringComponent]
public struct CommanderTag : IComponentData {}
}
@JohnnyTurbo
JohnnyTurbo / DoubleSpeedTag.cs
Created September 24, 2021 07:17
Code used in IJobEntityBatch tutorial video on the Turbo Makes Games YouTube Channel - https://youtu.be/nu_HyPuIBPA
using Unity.Entities;
namespace TMG.BatchedJobs
{
[GenerateAuthoringComponent]
public struct DoubleSpeedTag : IComponentData {}
}
@JohnnyTurbo
JohnnyTurbo / BlobAssetManagedData.cs
Created September 3, 2021 06:19
Code used in Component Data From Entity tutorial video on the Turbo Makes Games YouTube Channel - https://youtu.be/sXYVmjdVi9g
using Unity.Entities;
using UnityEngine;
namespace TMG.ECS_GetComponentFromEntity
{
[GenerateAuthoringComponent]
public class BlobAssetManagedData : IComponentData
{
public Entity[] Leaders;
}