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
Shader "Custom/Ring" { | |
Properties { | |
_MainTex ("Albedo (RGB)", 2D) = "white" {} | |
} | |
SubShader { | |
Tags { | |
"RenderType" = "Transparent" | |
"Queue" = "Transparent" | |
} | |
Blend SrcAlpha OneMinusSrcAlpha |
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
public static Color LerpHSV(Color a, Color b, float x) { | |
Vector3 ah = RGB2HSV(a); | |
Vector3 bh = RGB2HSV(b); | |
return new Vector3( | |
Mathf.LerpAngle(ah.x, bh.x, x), | |
Mathf.Lerp(ah.y, bh.y, x), | |
Mathf.Lerp(ah.z, bh.z, x) | |
); | |
} |
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.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
// An effect that causes a sprite to be squished vertically or horizontally | |
// e.g. player on jumping, enemies on hit | |
public class Squishable : MonoBehaviour { | |
[SerializeField] [Range(0, 1)] float squishAmount = 0.5f; | |
[SerializeField] [Range(0, 1)] float squishDuration = 0.1f; |
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.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
public class Tween { | |
public delegate void OnUpdate(float progress); | |
public delegate void OnFinish(); | |
MonoBehaviour mb; | |
OnFinish onFinish; |
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
local Oscillator = {} | |
Oscillator.__index = Oscillator | |
function Oscillator.new(period) | |
assert(period > 0) | |
return setmetatable({ | |
period = period or 1, | |
time = 0 | |
}, Oscillator) | |
end |
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
local Class = require 'modules.middleclass.middleclass' | |
local Stateful = require 'modules.stateful.stateful' | |
local Timer = require 'modules.hump.timer' | |
local Const = require 'src.const' | |
local Screen = Class('Screen') | |
Screen:include(Stateful) | |
local Iris = Screen:addState('Iris') | |
local Overlay = Screen:addState('Overlay') |
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
local Class = require 'modules.middleclass.middleclass' | |
local Timer = require 'modules.hump.timer' | |
local Vector = require 'modules.hump.vector' | |
local Const = require 'src.const' | |
local Util = require 'src.util' | |
local Camera = Class('Camera') | |
function Camera:initialize(settings) | |
settings = settings or {} |
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
local Class = require 'modules.middleclass.middleclass' | |
local Timer = require 'modules.hump.timer' | |
local Event = Class('Event') | |
function Event:initialize(time, callbacks) | |
assert(time and callbacks) | |
self.timer = Timer.new() | |
self.timer:after(time, function() | |
self.dead = true |
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
cp -r ../gemini/res/img/ . | |
love . img sprites | |
mv /home/david/.local/share/love/packer/sprites.png ../gemini/res/atlas/ | |
mv /home/david/.local/share/love/packer/sprites.lua ../gemini/res/atlas/ | |
rm -r img/ | |
cp -r ../gemini/res/img/* . | |
"/Applications/love.app/Contents/MacOS/love" . objects objects | |
mv "/Users/davidfu/Library/Application Support/LOVE/packer/*" ../gemini/res/atlas/ | |
rm -r backgrounds |
NewerOlder