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
export interface Fuga { | |
id: string | |
} | |
let hoge = {} | |
hoge['id'] = 'a_text' | |
hoge['dummy'] = 'dummy_text' | |
let fuga = (<Fuga>hoge) // エラーになってくれーー頼むーー |
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 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 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.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 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 Breakout.Component; | |
using Component; | |
using MessagePack; | |
namespace Component | |
{ | |
[Union(0, typeof(KTransform))] | |
[Union(3, typeof(KCubeRenderer))] | |
[Union(4, typeof(KScale))] |
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
https://github.com/kyubuns/AnimeTask | |
await UniTask.WhenAll( | |
// x | |
new UniTask( | |
async () => | |
{ | |
await Anime.Play( | |
Easing.Create<Linear>( | |
startPosition.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
CompositeResolver.RegisterAndSetAsDefault(new IJsonFormatter[] | |
{ | |
new IntValueFormatter<Gold>(x => new Gold(x)), | |
new IDFormatter<StageID>(x => new StageID(x)), | |
}, new[] | |
{ | |
StandardResolver.Default, | |
}); | |
// ----- |
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 UnityEditor; | |
using UnityEngine; | |
namespace AssetManager.Editor | |
{ | |
public static class AssetBuilder | |
{ | |
[MenuItem("Build/AssetBundles")] |
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
struct User { | |
id int | |
} | |
fn show_user_id(user *User) { | |
println(user.id) | |
} | |
fn main() { | |
user := User{id: 10} |
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
// HorizontalLayoutGroupのめっちゃシンプルで挙動が分かりやすくてスクリプトからサクッと入れれる版。 | |
// SourceというGameObjectを、itemsの数だけ左から右に並べる。 | |
var source = ui.Get<RectTransform>("Source"); | |
var listView = new ListView(new LeftToRightLayouter(), source); | |
using (var editor = listView.Edit()) | |
{ | |
foreach(var item in items) | |
{ |
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 Baum2; | |
using UnityEngine; | |
using Object = UnityEngine.Object; | |
namespace Baum2.Util | |
{ | |
public class ListView |