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
import React, { useCallback, createContext, useEffect, createRef, Fragment } from 'react' | |
import { createPortal } from 'react-dom' | |
import { store, view } from '@risingstack/react-easy-state' | |
const DIALOG_CANCEL = Symbol("Dialog(cancel)") | |
const INTERNALS = Symbol("Dialog(internals)") | |
const DialogContext = createContext() | |
const state = store({ | |
dialogs: [], |
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
<script> | |
import React from 'react' | |
import styles from './' | |
export default () => { | |
const [items, setItems] = React.useState([{id:1, text: 'First'}]) | |
return ( | |
<div className={styles.Test}> | |
<header>This is a Test</header> |
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
import React from 'react' | |
import { UIController, useController } from '../core' | |
import { stylesheet } from '../theme' | |
import { DomainObjectList } from 'fp-api' | |
type EmailAddressListProps = { | |
customerId: number | |
} | |
class EmailAddressListController extends UIController<EmailAddressListProps> { |
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
extends Node | |
# Be sure to AutoLoad me as a singleton | |
# Enumerate all your game events here... | |
enum { | |
GAME_STARTED, | |
GAME_OVER | |
} |
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
import { derive, readable, writable } from 'svelte/store.js' | |
import { produce } from 'immer' | |
export const update = produce | |
export function computed(deps, reactor) { | |
const source = derive(deps, reactor) | |
return { | |
subscribe: source.subscribe, | |
get snapshot() { return getSnapshot(source) } |
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
import { store } from "react-easy-state"; | |
interface PersistAPI<T = any> { | |
applySnapshot: (data: T) => void | |
getSnapshot: () => T | |
isLoaded: boolean | |
load: () => void | |
save: () => void | |
saveImmediately: () => void | |
} |
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
const _constructing: Set<any> = new Set() | |
const _services: Map<any, any> = new Map() | |
const _serviceOverrides: Map<any, any> = new Map() | |
interface Type<T> { new(...args: any[]): T } | |
function createInstance(CTor: any, args: any[] = []): any { | |
if (!CTor) { | |
// debugger | |
throw new Error(`Null or undefined dependency specified.`) |
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; | |
using System.Collections.Generic; | |
using UnityEngine; | |
using UnityEngine.Events; | |
namespace WizBangify | |
{ | |
public delegate void Subscription(bool add); |
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
// CodeMirror, copyright (c) by Marijn Haverbeke and others | |
// Distributed under an MIT license: http://codemirror.net/LICENSE | |
(function (mod) { | |
if (typeof exports == "object" && typeof module == "object") // CommonJS | |
mod(require("../../lib/codemirror"), require("../yaml/yaml")) | |
else if (typeof define == "function" && define.amd) // AMD | |
define(["../../lib/codemirror", "../yaml/yaml"], mod) | |
else // Plain browser env | |
mod(CodeMirror) |
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 UnityEngine; | |
/* | |
You could name this class GameEvents or whatever you want. I chose Announcments because | |
it doesn't conflict with any builtin Unity class names. I can just type 'ann' and my IDE's | |
auto-complete takes care of the rest. | |
*/ | |
public static class Announcements | |
{ | |
public static class Camera |