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
code, | |
code[class*='language-'], | |
pre[class*='language-'] { | |
color: #24292e; | |
text-align: left; | |
white-space: pre; | |
word-spacing: normal; | |
tab-size: 4; | |
hyphens: none; | |
} |
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
public static class Dummy | |
{ | |
public static void Run() | |
{ | |
Debug.Log("Run!"); | |
Observable.Timer(TimeSpan.FromSeconds(1)) | |
.Subscribe(x => | |
{ | |
if (Random.Range(0, 2) == 0) Success?.Invoke(); | |
else Failed?.Invoke("エラーメッセージ"); |
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
@:generic | |
class ArrayWrapper<T> | |
{ | |
public function new() {} | |
public var value: Array<T> = []; | |
#if cs | |
public function toTyped(): List_1<T> | |
{ |
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
class ArrayTest | |
{ | |
public var hoges: Array<Hoge>; | |
} | |
class Hoge | |
{ | |
public var x: Int; | |
public var y: Int; | |
public var z: Int; |
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
export interface Fuga { | |
id: string | |
} | |
let hoge = {} | |
hoge['id'] = 'a_text' | |
hoge['dummy'] = 'dummy_text' | |
let fuga = (<Fuga>hoge) // エラーになってくれーー頼むーー |
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
class CharacteristicWrapper { | |
constructor(rawCharacteristic) { | |
this.rawCharacteristic = rawCharacteristic | |
this.uuid = rawCharacteristic.uuid.replace(/-/g, "") | |
this.properties = ["notify"] | |
} | |
toBuffer(ab) { | |
var buf = toio.scanner.Buffer.alloc(ab.byteLength); | |
var view = new Uint8Array(ab); |
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 System.Collections.Generic; | |
using System.Threading.Tasks; | |
using AnimeTask; | |
using BasicShapeSprite; | |
using UnityEditor; | |
using UnityEngine; | |
public class Demo : MonoBehaviour | |
{ | |
[SerializeField] private List<Square> squares = new List<Square>(); |
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 System.Collections.Generic; | |
using Breakout.Component; | |
using Component; | |
using MessagePack; | |
namespace Component | |
{ | |
[Union(0, typeof(KTransform))] | |
[Union(3, typeof(KCubeRenderer))] | |
[Union(4, typeof(KScale))] |
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
https://github.com/kyubuns/AnimeTask | |
await UniTask.WhenAll( | |
// x | |
new UniTask( | |
async () => | |
{ | |
await Anime.Play( | |
Easing.Create<Linear>( | |
startPosition.x, |
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
CompositeResolver.RegisterAndSetAsDefault(new IJsonFormatter[] | |
{ | |
new IntValueFormatter<Gold>(x => new Gold(x)), | |
new IDFormatter<StageID>(x => new StageID(x)), | |
}, new[] | |
{ | |
StandardResolver.Default, | |
}); | |
// ----- |