Skip to content

Instantly share code, notes, and snippets.

View ilhamhe's full-sized avatar

Ilham Hasymi Effendi ilhamhe

View GitHub Profile
@ilhamhe
ilhamhe / SpriteFlash.cs
Last active July 22, 2019 16:40
c# script to manipulate/use sprite flash
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class SpriteFlash : MonoBehaviour {
public Color flashColor;
public float flashDuration;
Material mat;
@ilhamhe
ilhamhe / SpriteFlash.shader
Created July 22, 2019 16:30
Unity shader for sprite flash
Shader "Sprites/Sprite Flash"
{
Properties
{
[PerRendererData] _MainTex ("Sprite Texture", 2D) = "white" {}
_Color ("Tint", Color) = (1,1,1,1)
[MaterialToggle] PixelSnap ("Pixel snap", Float) = 0
_FlashColor ("Flash Color", Color) = (1,1,1,1)
_FlashAmount ("Flash Amount", Range (0,1)) = 0
}