Skip to content

Instantly share code, notes, and snippets.

UNetWeaver error: Exception :System.ArgumentException: An element with the same key already exists in the dictionary.
at System.Collections.Generic.Dictionary`2[System.UInt32,System.UInt32].Add (UInt32 key, UInt32 value) [0x0007e] in /Users/builduser/buildslave/mono-runtime-and-classlibs/build/mcs/class/corlib/System.Collections.Generic/Dictionary.cs:404
at Mono.Cecil.MetadataSystem.SetReverseNestedTypeMapping (UInt32 nested, UInt32 declaring) [0x00000] in <filename unknown>:0
at Mono.Cecil.MetadataReader.AddNestedMapping (UInt32 declaring, UInt32 nested) [0x00000] in <filename unknown>:0
at Mono.Cecil.MetadataReader.InitializeNestedTypes () [0x00000] in <filename unknown>:0
at Mono.Cecil.MetadataReader.InitializeTypeDefinitions () [0x00000] in <filename unknown>:0
at Mono.Cecil.MetadataReader.ReadTypes () [0x00000] in <filename unknown>:0
at Mono.Cecil.ModuleDefinition.<get_Types>b__8 (Mono.Cecil.ModuleDefinition _, Mono.Cecil.MetadataReader reader) [0x00000] in <filename unknown>:0
at
trait MyPromise[A] {
def complete(value: A)
def future: MyFuture[A]
def value: Option[A]
}
trait MyFuture[A] {
def onComplete(f: A => Unit)
def value: Option[A]
def map[B](f: A => B): MyFuture[B]
using UnityEngine;
using System.Collections;
using com.tinylabproductions.TLPLib.Reactive;
using System;
public class CubeComponent : MonoBehaviour, IObserver<string>
{
// Use this for initialization
void Start() {
@arturaz
arturaz / gist:9757939
Last active August 29, 2015 13:57
Example of keyboard dashing behaviour for Unity3D using TLPLib Reactive Extensions (https://github.com/tinylabproductions/tlplib)
using System;
using System.Collections;
using com.tinylabproductions.TLPLib.Collection;
using com.tinylabproductions.TLPLib.Functional;
using com.tinylabproductions.TLPLib.Reactive;
using UnityEngine;
namespace Keyboard {
class KeyboardDash : MonoBehaviour {
private const int presses = 2;
@arturaz
arturaz / gist:1645200a73ac55eaf72e
Last active August 29, 2015 14:02
Unity compiler is buggy
ctx => { var i = ctx._1; var bi = ctx._2; var map = ctx._3;
Log.editor("flatMap subIter skip: \n ctx=" + ctx + "\n i=" + i + "\n bi=" + bi);
Outputs:
ctx=(
Iter(Some((System.Collections.Generic.List`1[System.Int32],0,False))|sh:Some(3)),
Iter(Some((System.Collections.Generic.List`1[System.Int32],0,False))|sh:Some(2)),
System.Fn`2[System.Int32,com.tinylabproductions.TLPLib.Iter.Iter`2[System.Int32,System.Tpl`3[System.Collections.Generic.IList`1[System.Int32],System.Int32,System.Boolean]]]
)
implicit class OrderingOps[T](val ord: Ordering[T]) extends AnyVal {
def orElse(ord2: Ordering[T]) = new CompositeOrdering[T](ord, ord2)
}
final class CompositeOrdering[T](
val ord1: Ordering[T], val ord2: Ordering[T]
) extends Ordering[T] {
def compare( x: T, y: T ) = {
package app.models.world
import java.util.UUID
import shapeless._
import shapeless.ops.record.Selector
import shapeless.record._
import shapeless.syntax.singleton._
trait WObjectStats
package app.models.world
import java.util.UUID
import shapeless._
import shapeless.ops.record.Selector
import shapeless.record._
case class Vect2(x: Int, y: Int)
case class Bounds(position: Vect2, size: Vect2)
package utils.actors
import akka.actor.{ActorLogging, Actor, ActorRef}
import akka.util.ByteString
import scala.reflect.ClassTag
object CodedFrameProxy {
case class Init(intFramedProxy: ActorRef, decodedMessageHandler: ActorRef)
}
{
games: [
{
"title": "Orborun",
"description": "Orborun is a 3D run & roll game where your nerves will be put to the test.",
"youtube_key": "YnVI9AVWx5U",
"start_at_s": 50,
"platforms": ["ios", "android", "windows", "osx", "linux", "wp8"],
"links": {
"google-play": "https://play.google.com/store/apps/details?id=com.bulkypix.orborun",