This file contains 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 "Dots" | |
{ | |
Properties | |
{ | |
_MainTex ("Main Texture", 2D) = "white" {} | |
_Color ("Main Color", Color) = (1, 1, 1, 1) | |
_Alpha ("Alpha", Float) = 1.0 | |
[MaterialToggle] _Invert ("Invert", Float) = 0.0 | |
} |
This file contains 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
for (var i = 0; i < 12; ++i) { | |
g = GameObject.Instantiate(prefab); | |
g.transform.SetParent(prefab.transform.parent); | |
g.transform.localPosition = Vector3.zero; | |
g.transform.localScale = Vector3.one; | |
var angle = 30f * i; | |
var radius = Velocity.AccelByRatio(218f, Source.Constant(0.92f)).Offset(83f); | |
var speed = Velocity.AccelByRatio(0.75f, Source.Constant(0.94f)).Offset(0.01f); | |
g.MotionP().Circular(radius, speed).Angle(angle).Fbm(new Vector2(0f, 1f), 3).AmplifyComponents(new Vector2(0f, 0.3f)); |
This file contains 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; | |
using System.Collections.Generic; | |
public class CustomTrailRenderer : MonoBehaviour { | |
IEnumerator Start() { | |
var target = (Transform)null; | |
while (target == null) { | |
target = transform.parent; |
This file contains 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 "Legacy Shaders/Dither Diffuse" { | |
Properties { | |
_Color ("Main Color", Color) = (1,1,1,1) | |
_MainTex ("Base (RGB)", 2D) = "white" {} | |
} | |
SubShader { | |
Tags { "RenderType"="Opaque" } | |
LOD 200 | |
CGPROGRAM |
This file contains 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 UnityEngine.UI; | |
public class NonTouchable : MonoBehaviour, ICanvasRaycastFilter | |
{ | |
public bool IsRaycastLocationValid(Vector2 sp, Camera eventCamera) | |
{ | |
return false; | |
} | |
} |
This file contains 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
// length を持ってれば empty? が使える | |
extension EmptyExtension | |
{ | |
requires length:UInt | |
get empty?():Boolean { length > 0 } | |
} |
This file contains 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
// 俺は String に empty? が欲しいんだ | |
extension StringExtensions for String | |
{ | |
get empty?():Boolean { length > 0 } | |
} |