Skip to content

Instantly share code, notes, and snippets.

@adammyhre
adammyhre / AOETargeting.cs
Last active October 8, 2025 08:24
Ability Targeting System
using System;
using System.Linq;
using Unity.Cinemachine;
using UnityEngine;
using UnityEngine.InputSystem;
using UnityUtils;
[Serializable]
public class AOETargeting : TargetingStrategy {
public GameObject aoePrefab;
@adammyhre
adammyhre / DamageOverTimeEffect.cs
Created September 21, 2025 11:43
Effects Over Time Example
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;
@ArieLeo
ArieLeo / AnimationEvent.cs
Created February 9, 2024 13:58 — forked from Doprez/AnimationEvent.cs
Stride Animation event trigger
using ImmoApocalypse.Code.Core.Structs;
using Stride.Core;
using Stride.Engine;
using System;
using System.Windows.Media.Animation;
namespace Core;
[DataContract(nameof(AnimationEvent))]
[AllowMultipleComponents]
// Pixel (nearest neighbor) shader by nothke
//- Substance 3D Painter Metal/Rough PBR shader
//- ====================================
//-
//- Import from libraries.
import lib-pbr.glsl
import lib-bent-normal.glsl
import lib-emissive.glsl
import lib-pom.glsl
@ArieLeo
ArieLeo / Usage.cs
Created November 7, 2021 09:38 — forked from Refsa/Usage.cs
DrawMeshInstancedIndirect with ShaderGraph and URP
using System.Collections.Generic;
using System.Runtime.InteropServices;
using UnityEngine;
class Render : MonoBehaviour
{
struct DrawData
{
public Vector3 Pos;
public Quaternion Rot;
class treeThing {
// tree design: all the changable variables in one place!
struct treeStyle {
// skipping stuff like how many branches per tree, sticks per branch..
// sticks
Vector2 stickAngleJagMM; // how jaggy the branches are (min-max)
Vector2 stickLengthMM; // how long the sticks are (min-max)
@dacap
dacap / Plasma.lua
Created July 4, 2019 00:17
Plasma Script for Aseprite -- https://www.aseprite.org
-- Copyright (C) 2019 David Capello
local dlg = Dialog("Plasma")
:number{ id="width", label="Size:", text="100", focus=true }
:number{ id="height", text="100" }
:number{ id="frames", label="Frames:", text="100" }
:button{ id="ok", text="OK", focus=true }
:button{ id="cancel", text="Cancel" }
dlg:show()
@KenneyNL
KenneyNL / CircularMenu.cs
Last active June 23, 2022 19:41
Circular menu sample code for Unity
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class CircularMenu : MonoBehaviour{
public float radius = 100.0f;
public float offset = 0.0f;
void Start(){
@ruccho
ruccho / Generate Normal Map for all frames.lua
Last active April 25, 2025 17:08
Lua script for Aseprite that generates normal map automatically from all frames of selected layers.
----------------------------------------------------------------------
-- Generate Normal Map
--
-- It works only for RGB color mode.
----------------------------------------------------------------------
if app.apiVersion < 1 then
return app.alert("This script requires Aseprite v1.2.10-beta3")
end
----------------------------------------------------------------------
-- Generate Normal Map
--
-- It works only for RGB color mode.
----------------------------------------------------------------------
if app.apiVersion < 1 then
return app.alert("This script requires Aseprite v1.2.10-beta3")
end