Add StickGame Assets

This commit is contained in:
Dzejkobik007
2024-03-24 22:21:16 +01:00
parent 5a5812c0c7
commit 6c8b523d1f
6643 changed files with 596260 additions and 0 deletions

View File

@@ -0,0 +1,45 @@
//
// Author:
// Jb Evain (jbevain@gmail.com)
//
// Copyright (c) 2008 - 2015 Jb Evain
// Copyright (c) 2008 - 2011 Novell, Inc.
//
// Licensed under the MIT/X11 license.
//
using System;
namespace MonoFN {
static class Disposable {
public static Disposable<T> Owned<T> (T value) where T : class, IDisposable
{
return new Disposable<T> (value, owned: true);
}
public static Disposable<T> NotOwned<T> (T value) where T : class, IDisposable
{
return new Disposable<T> (value, owned: false);
}
}
struct Disposable<T> : IDisposable where T : class, IDisposable {
internal readonly T value;
readonly bool owned;
public Disposable (T value, bool owned)
{
this.value = value;
this.owned = owned;
}
public void Dispose ()
{
if (value != null && owned)
value.Dispose ();
}
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 1aa8d86dc5c9323419e8b535d582fccf
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,62 @@
//
// Author:
// Jb Evain (jbevain@gmail.com)
//
// Copyright (c) 2008 - 2015 Jb Evain
// Copyright (c) 2008 - 2011 Novell, Inc.
//
// Licensed under the MIT/X11 license.
//
using MonoFN.Collections.Generic;
using System;
namespace MonoFN {
static class Empty<T> {
public static readonly T [] Array = new T [0];
}
class ArgumentNullOrEmptyException : ArgumentException {
public ArgumentNullOrEmptyException (string paramName)
: base ("Argument null or empty", paramName)
{
}
}
}
namespace MonoFN.Cecil {
static partial class Mixin {
public static bool IsNullOrEmpty<T> (this T [] self)
{
return self == null || self.Length == 0;
}
public static bool IsNullOrEmpty<T> (this Collection<T> self)
{
return self == null || self.size == 0;
}
public static T [] Resize<T> (this T [] self, int length)
{
Array.Resize (ref self, length);
return self;
}
public static T [] Add<T> (this T [] self, T item)
{
if (self == null) {
self = new [] { item };
return self;
}
self = self.Resize (self.Length + 1);
self [self.Length - 1] = item;
return self;
}
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 4662c38d1a951c24b89aeae3390acd39
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,66 @@
//
// Author:
// Jb Evain (jbevain@gmail.com)
//
// Copyright (c) 2008 - 2015 Jb Evain
// Copyright (c) 2008 - 2011 Novell, Inc.
//
// Licensed under the MIT/X11 license.
//
using System;
using System.Collections.Generic;
namespace MonoFN {
class MergeSort<T> {
private readonly T [] elements;
private readonly T [] buffer;
private readonly IComparer<T> comparer;
private MergeSort (T [] elements, IComparer<T> comparer)
{
this.elements = elements;
this.buffer = new T [elements.Length];
Array.Copy (this.elements, this.buffer, elements.Length);
this.comparer = comparer;
}
public static void Sort (T [] source, IComparer<T> comparer)
{
Sort (source, 0, source.Length, comparer);
}
public static void Sort (T [] source, int start, int length, IComparer<T> comparer)
{
new MergeSort<T> (source, comparer).Sort (start, length);
}
private void Sort (int start, int length)
{
TopDownSplitMerge (this.buffer, this.elements, start, length);
}
private void TopDownSplitMerge (T [] a, T [] b, int start, int end)
{
if (end - start < 2)
return;
int middle = (end + start) / 2;
TopDownSplitMerge (b, a, start, middle);
TopDownSplitMerge (b, a, middle, end);
TopDownMerge (a, b, start, middle, end);
}
private void TopDownMerge (T [] a, T [] b, int start, int middle, int end)
{
for (int i = start, j = middle, k = start; k < end; k++) {
if (i < middle && (j >= end || comparer.Compare (a [i], a [j]) <= 0)) {
b [k] = a [i++];
} else {
b [k] = a [j++];
}
}
}
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 3c35ecf3bff670b4c8b367ed632eee37
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant: