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
| private IEnumerator Sample12() | |
| { | |
| var hp = new ReactiveProperty<int>(100); | |
| var gauge = new ReactiveProperty<float>(100.0f); | |
| // HPゲージは、実際の値に1.5秒かけて追いつく | |
| hp | |
| .Select(x => Anime.Play(gauge.Value, x, Easing.EaseOutSine(TimeSpan.FromSeconds(1.5)))) | |
| .Switch() | |
| .Subscribe(x => gauge.Value = 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
| Anime.Play(new Vector3(-5f, 0f, 0f), new Vector3(5f, 0f, 0f), Motion.Uniform(4f)) | |
| .Wait(TimeSpan.FromSeconds(2.0f)) | |
| .Play(new Vector3(10f, 0f, 0f), Motion.Uniform(4f)) | |
| .SubscribeToPosition(cube); |
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
| namespace System.Linq | |
| { | |
| public static class LinqExtensions | |
| { | |
| public static string ToJoinString<T>(this IEnumerable<T> self) | |
| { | |
| return string.Join(", ", self); | |
| } | |
| } | |
| } |
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.Generic; | |
| using System.Linq; | |
| using UniRx; | |
| namespace Misc | |
| { | |
| public class QueueAsyncMessageBroker | |
| { | |
| private bool Running; |
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 UniRx; | |
| namespace Development | |
| { | |
| public static class MessagePublisherExtensions | |
| { | |
| public static void PublishWithBaseType<T>(this IMessagePublisher self, T message) | |
| { | |
| self.Publish(message); | |
| for (var baseType = typeof(T).BaseType; null != baseType; baseType = baseType.BaseType) |
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.IO; | |
| using System.Text; | |
| using System.Collections.Generic; | |
| using System.Linq; | |
| using Microsoft.CodeAnalysis; | |
| using Microsoft.CodeAnalysis.CSharp; | |
| using Microsoft.CodeAnalysis.CSharp.Syntax; | |
| namespace MessagePackIikanzi |
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.Threading.Tasks; | |
| using UniRx; | |
| using UnityEngine; | |
| public class Sample1 : MonoBehaviour | |
| { | |
| public async Task Start() | |
| { | |
| var input = await MessageBroker.Default.Receive<Hoge>().First(); | |
| Debug.Log($"Result: {input.Value}"); |
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.Collections.Generic; | |
| using UnityEngine; | |
| using UniRx; | |
| namespace Dev | |
| { | |
| public class Sandbox : 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
| #!/bin/bash | |
| # $HOME/accountsにgithubのユーザー名を行区切りで書いておく | |
| # accountsファイルは空行可、先頭に#でコメントが書ける | |
| set -eu | |
| pushd "$HOME" | |
| test -r accounts |
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.Generic; | |
| using UnityEngine; | |
| public class JsonTest : MonoBehaviour | |
| { | |
| void Start() | |
| { | |
| var json = Serialize(); | |
| Desirialize(json); |