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) |
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
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 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) { |
OlderNewer