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
if git commit -v --dry-run | grep 'no commit' > /dev/null 2>&1 | |
then | |
echo "Trying to commit non-committable code." | |
exit 1 | |
else | |
exit 0 | |
fi |
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
xcargs = "" | |
xcargs += " IDEBuildOperationMaxNumberOfConcurrentCompileTasks=16" | |
xcargs += " GCC_GENERATE_DEBUGGING_SYMBOLS=NO DEBUG_INFORMATION_FORMAT=dwarf" | |
xcargs += " ONLY_ACTIVE_ARCH=YES VALID_ARCHS=arm64" | |
xcargs += " CC=\"ccacheclang\" GCC_PRECOMPILE_PREFIX_HEADER=NO" if File.exist?("/usr/local/bin/ccacheclang") |
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.Threading.Tasks; | |
using AnimeTask; | |
using UnityEngine; | |
using Animator = AnimeTask.Animator; | |
public class Hoge : MonoBehaviour | |
{ | |
public async void Start() | |
{ |
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
git status -s | grep -E '.meta$' | tee diff.txt | |
if [ -s diff.txt ]; then | |
exit 1 | |
fi |
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; | |
using System.Threading.Tasks; | |
using UnityEngine; | |
namespace Hoge | |
{ | |
public class CoroutineRunner : MonoBehaviour | |
{ | |
private static MonoBehaviour instance; |
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
class String | |
def snakecase | |
#gsub(/::/, '/'). | |
gsub(/([A-Z]+)([A-Z][a-z])/,'\1_\2'). | |
gsub(/([a-z\d])([A-Z])/,'\1_\2'). | |
tr('-', '_'). | |
gsub(/\s/, '_'). | |
gsub(/__+/, '_'). | |
downcase | |
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
using System.Collections.Generic; | |
using System.Linq; | |
using UnityEngine; | |
using UnityEngine.SceneManagement; | |
#if UNITY_EDITOR | |
using UnityEditor; | |
#endif | |
public class HotReload : MonoBehaviour | |
{ |
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 class BarAnimation : MonoBehaviour | |
{ | |
[SerializeField] private SpriteRenderer sprite; | |
private readonly Subject<Unit> subject = new Subject<Unit>(); | |
public void Start() | |
{ | |
subject.Select(_ => Anime.Play(new Vector3(1.5f, 1.5f, 1.5f), new Vector3(1f, 1f, 1f), Easing.OutElastic(TimeSpan.FromSeconds(0.5f)))) | |
.Switch() | |
.SubscribeToLocalScale(sprite.transform) |
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
var x = Anime.Play(1.0f, 0.5f, Easing.EaseInOutSine(TimeSpan.FromSeconds(1f))) | |
.Play(1.0f, Easing.EaseOutElastic(TimeSpan.FromSeconds(0.8f))); | |
var y = Anime.Play(1.0f, 1.2f, Easing.EaseInOutSine(TimeSpan.FromSeconds(1f))) | |
.Play(1.0f, Easing.EaseOutElastic(TimeSpan.FromSeconds(0.8f))); | |
Observable.CombineLatest(x, y) | |
.Select(s => new Vector3(s[0], s[1], 1f)) | |
.SubscribeToLocalScale(sphere); |