Skip to content

Instantly share code, notes, and snippets.

Kirill KumoKairo

Block or report user

Report or block KumoKairo

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View TypedCommands.fs
type FadeToBgCommand = {
background: string
}
type PlayMusicCommand = {
trackName: string
}
type LockClosetCommand = {}
View Example.cs
dialoguePanel.DOSizeDelta(new Vector2(_dialogWeight, LayoutUtility.GetPreferredHeight(dialoguePanel) + 20f), animSettings.portraitAnimationDuration / 1.2f).OnComplete(() =>
// Второй вариант
dialoguePanel
.DOSizeDelta(
new Vector2(_dialogWeight, LayoutUtility.GetPreferredHeight(dialoguePanel) + 20f),
animSettings.portraitAnimationDuration / 1.2f)
.OnComplete(() =>
// Третий вариант
View CheckPreferredHeight.cs
using System;
using DG.Tweening;
using UnityEngine;
using UnityEngine.UI;
public class CheckPreferredHeight : MonoBehaviour
{
public RectTransform targetRect;
private RectTransform _currentRect;
View NewExampleStory.json
{"inkVersion":18,"root":[[["^I looked at Monsieur Fogg","\n",["ev",{"^->":"0.g-0.2.$r1"},{"temp=":"$r"},"str",{"->":".^.s"},[{"#n":"$r1"}],"/str","/ev",{"*":".^.^.c-0","flg":18},{"s":["^... and I could contain myself no longer.",{"->":"$r","var":true},null]}],["ev",{"^->":"0.g-0.3.$r1"},{"temp=":"$r"},"str",{"->":".^.s"},[{"#n":"$r1"}],"/str","/ev",{"*":".^.^.c-1","flg":18},{"s":["^... but I said nothing",{"->":"$r","var":true},null]}],{"c-0":["ev",{"^->":"0.g-0.c-0.$r2"},"/ev",{"temp=":"$r"},{"->":".^.^.2.s"},[{"#n":"$r2"}],"\n","^'What is the purpose of our journey, Monsieur?'","\n","^'A wager,' he replied.","\n",[["ev",{"^->":"0.g-0.c-0.11.0.$r1"},{"temp=":"$r"},"str",{"->":".^.s"},[{"#n":"$r1"}],"/str","/ev",{"*":".^.^.c-0","flg":18},{"s":["^'A wager!'",{"->":"$r","var":true},null]}],["ev",{"^->":"0.g-0.c-0.11.1.$r1"},{"temp=":"$r"},"str",{"->":".^.s"},[{"#n":"$r1"}],"/str","str","^.'","/str","/ev",{"*":".^.^.c-1","flg":22},{"s":["^'Ah",{"->":"$r","var":true},null]}],{"c-0":["ev",{"^->":"0.g-0.c-0.11.c-0.
View OldExampleStory.json
{"inkVersion":18,"root":[[["^I looked at Monsieur Fogg","\n",["ev",{"^->":"0.g-0.2.$r1"},{"temp=":"$r"},"str",{"->":".^.s"},[{"#n":"$r1"}],"/str","/ev",{"*":".^.^.c-0","flg":18},{"s":["^... and I could contain myself no longer.",{"->":"$r","var":true},null]}],["ev",{"^->":"0.g-0.3.$r1"},{"temp=":"$r"},"str",{"->":".^.s"},[{"#n":"$r1"}],"/str","/ev",{"*":".^.^.c-1","flg":18},{"s":["^... but I said nothing",{"->":"$r","var":true},null]}],{"c-0":["ev",{"^->":"0.g-0.c-0.$r2"},"/ev",{"temp=":"$r"},{"->":".^.^.2.s"},[{"#n":"$r2"}],"\n","^'What is the purpose of our journey, Monsieur?'","\n","^'A wager,' he replied.","\n",[["ev",{"^->":"0.g-0.c-0.11.0.$r1"},{"temp=":"$r"},"str",{"->":".^.s"},[{"#n":"$r1"}],"/str","/ev",{"*":".^.^.c-0","flg":18},{"s":["^'A wager!'",{"->":"$r","var":true},null]}],["ev",{"^->":"0.g-0.c-0.11.1.$r1"},{"temp=":"$r"},"str",{"->":".^.s"},[{"#n":"$r1"}],"/str","str","^.'","/str","/ev",{"*":".^.^.c-1","flg":22},{"s":["^'Ah",{"->":"$r","var":true},null]}],{"c-0":["ev",{"^->":"0.g-0.c-0.11.c-0.
View FastAction.cs
// Code from TextMeshPro
using System;
using System.Collections.Generic;
namespace TMPro
{
public class FastAction<A>
{
private LinkedList<Action<A>> delegates = new LinkedList<Action<A>>();
View ComponentPoolExample.cs
class EcsComponentPool<T> : IEcsComponentPool where T : class, new ()
{
public static readonly EcsComponentPool<T> Instance = new EcsComponentPool<T> ();
private Func<T> _factory;
public void MapFactory(Func<T> factory)
{
_factory = factory;
}
View DelegatesVsVanillaObserver.cs
[Test]
public void DelegatesVsVanillaSubscriberList()
{
const int count = 10000;
var observerImplementation = new ObserverImplementation();
var sw = new Stopwatch();
sw.Start();
Action action = () => { };
for (int i = 0; i < count; i++)
{
View Tests check
[Generic Entity] Total time: 5823
[Generic Entity] Avg time: 0.5823
[Code Gen Entity] Total time: 4777
[Code Gen Entity] Avg time: 0.4777
Tests completed
[Generic Entity] Total time: 6167
[Generic Entity] Avg time: 0.6167
[Code Gen Entity] Total time: 5985
[Code Gen Entity] Avg time: 0.5985
Tests completed
View Mapping actions example.cs
// -------------------------------
// Common action invoker interface
public interface IActionInvoker
{
string InvokingActionType { get; }
void Execute(Contexts contexts);
}
// -------------------------------
You can’t perform that action at this time.