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 ImprovedTimers; // https://github.com/adammyhre/Unity-Improved-Timers | |
| using UnityEngine; | |
| [Serializable] | |
| public class Ability { | |
| public AudioClip castSfx; | |
| public GameObject castVfx; | |
| public GameObject runningVfx; |
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; | |
| using System.Collections.Generic; | |
| using UnityUtils; // https://github.com/adammyhre/Unity-Utils | |
| public class CullingManager : Singleton<CullingManager> { | |
| #region Fields | |
| public Camera cullingCamera; | |
| public float maxCullingDistance = 100f; | |
| public LayerMask cullableLayers; |
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; | |
| using System; | |
| using System.Collections.Generic; | |
| using System.Runtime.CompilerServices; | |
| using CanTarget = And<And<InRange, IsAlive>, LineOfSight>; | |
| // ---------- Domain ---------- | |
| class Health : MonoBehaviour { | |
| public int hp = 10; |
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 TMPro; | |
| using Unity.Cinemachine; | |
| using UnityEngine; | |
| using UnityEngine.UI; | |
| using UnityUtils; | |
| [DisallowMultipleComponent] | |
| public class EnemyWorldUI : 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
| #!/usr/bin/env bash | |
| set -euo pipefail | |
| ############################################## | |
| # make-template.sh | |
| # | |
| # This script packages a Unity template for local use | |
| # in Unity Hub's ProjectTemplates folder. | |
| # | |
| # How it works: |
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 Unity.Collections; | |
| using Unity.Collections.LowLevel.Unsafe; | |
| public unsafe class ArenaAllocator : IDisposable { | |
| byte* buffer; // 'buffer' is a pointer to a byte (i.e., byte*) | |
| int offset; | |
| readonly int capacity; | |
| public ArenaAllocator(int sizeInBytes) { |
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 UnityEngine; | |
| [CreateAssetMenu(fileName = "AbilityData", menuName = "ScriptableObjects/AbilityData")] | |
| class AbilityData : ScriptableObject { | |
| public string label; | |
| public AnimationClip animationClip; | |
| [Range(0.1f, 4f)] public float castTime = 2f; |
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 ImprovedTimers; | |
| using UnityEngine; | |
| namespace AdvancedController { | |
| [RequireComponent(typeof(PlayerController))] | |
| public class AnimationController : MonoBehaviour { | |
| PlayerController controller; | |
| Animator animator; | |
| CountdownTimer animationTimer; |
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
| #pragma kernel CSMain | |
| RWTexture2D<float> heatmapTexture; | |
| float2 texSize; | |
| StructuredBuffer<float2> enemyPositions; | |
| int enemyCount; | |
| [numthreads(8, 8, 1)] | |
| void CSMain(uint3 id : SV_DispatchThreadID) |