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
// ... | |
static JsonWriter jsonWriter; | |
static JsonReader jsonReader; | |
ReadResponse readResponse; | |
class ReadResponse | |
{ | |
public string Message; |
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
public interface IEdible | |
{ | |
void Eat(); | |
} | |
public interface IOrganic | |
{ | |
void ApplyDubiousHealthBenefits(Body a); | |
} | |
public class PriceyApple : IEdible, IOrganic |
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
void vert(inout appdata_full v, out Input o) | |
{ | |
UNITY_INITIALIZE_OUTPUT(Input, o); | |
// get the camera basis vectors | |
float3 forward = -normalize(UNITY_MATRIX_V._m20_m21_m22); | |
float3 up = float3(0, 1, 0); //normalize(UNITY_MATRIX_V._m10_m11_m12); | |
float3 right = normalize(UNITY_MATRIX_V._m00_m01_m02); | |
// rotate to face camera |
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
struct SubstringInfo | |
{ | |
public int StartsAt; | |
public string TagSuffix; | |
public SubstringInfo(int startsAt, IEnumerable<string> tagSuffixChain) | |
{ | |
StartsAt = startsAt; | |
TagSuffix = string.Empty; | |
foreach (var tagSuffix in tagSuffixChain) |
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; | |
using System.Threading; | |
using UnityEngine; | |
class WaveformDisplay : MonoBehaviour | |
{ | |
public Tracker Tracker; | |
public int LineSegments; |
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; | |
/* **************** | |
* Sample Usage * | |
**************** | |
// prerequisite : put a gameobject with the ADSR script on it in your scene | |
// this enables the update loop that transparently updates Envelope objects | |
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 Microsoft.Xna.Framework; | |
using Microsoft.Xna.Framework.GamerServices; | |
using XnaCommons.Structure; | |
using XnaCommons.Tools; | |
namespace XnaCommons.Components | |
{ | |
public static class Waiters | |
{ |
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
public static class EventExtensions | |
{ | |
public static void AddEvent<TSource, TEvent>(this EventTrigger _trigger, EventTriggerType _eventType, TSource _source, Action<TSource, TEvent> _delegate) | |
where TEvent : BaseEventData | |
{ | |
EventTrigger.TriggerEvent triggerEvent = new EventTrigger.TriggerEvent(); | |
triggerEvent.AddListener(_data => _delegate(_source, _data as TEvent)); | |
_trigger.triggers.Add(new EventTrigger.Entry { eventID = _eventType, callback = triggerEvent }); | |
} | |
} |
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.Concurrent; | |
namespace FezEngine.Tools | |
{ | |
public static class DrawActionScheduler | |
{ | |
static readonly ConcurrentQueue<Action> DeferredDrawActions = new ConcurrentQueue<Action>(); | |
public static void Schedule(Action action) |
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.Globalization; | |
using UnityEngine; | |
namespace Yarn | |
{ | |
// A value from inside Yarn. | |
public struct Value : IComparable, IComparable<Value>, IEquatable<Value> | |
{ | |
internal readonly Type type; |
OlderNewer