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; | |
using UnityEngine.UI; | |
// Based on the Unity built-in image source (Unity Reference-Only License, https://unity3d.com/legal/licenses/Unity_Reference_Only_License) | |
// Modified to add full-mesh UVs by Brian MacIntosh | |
namespace UI | |
{ | |
/// <summary> | |
/// Image override that fills the second UV channel with uniform UVs over the entire image. |
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; | |
// Include the DialogueDesigner namespace | |
using DD; | |
/// <summary> | |
/// Complete example that plays a Dialogue Designer dialogue in the unity debug console. | |
/// Use the number keys to make choices. | |
/// </summary> | |
public class DialogueDesignerExample : MonoBehaviour |
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.Collections.Generic; | |
using System.Globalization; | |
using UnityEditor; | |
using UnityEngine; | |
/* | |
Copyright (c) 2019-2020 Brian MacIntosh | |
Permission is hereby granted, free of charge, to any person obtaining a copy | |
of this software and associated documentation files (the "Software"), to deal |
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 UnityEditor; | |
using UnityEngine; | |
// Author: Brian MacIntosh (The Periodic Group) | |
// MIT License | |
/// <summary> | |
/// Base class that can be extended to quickly create a property drawer for a structure containing | |
/// data like "quantity" of "thing". | |
/// </summary> |
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
// Unity built-in shader source. Copyright (c) 2016 Unity Technologies. MIT license (see license.txt) | |
// Modified to add gradient color by Brian MacIntosh | |
Shader "UI/Gradient" | |
{ | |
Properties | |
{ | |
[PerRendererData] _MainTex("Sprite Texture", 2D) = "white" {} | |
_TopLeftColor("Gradient Top Left", Color) = (1,1,1,1) | |
_TopRightColor("Gradient Top Right", Color) = (1,1,1,1) |
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 System.Linq; | |
using System.Text; | |
using Microsoft.Xna.Framework; | |
using Microsoft.Xna.Framework.Graphics; | |
/* | |
* XNA Lightweight Sprite Animation | |
* by Brian MacIntosh for ThunderFish Entertainment/BoneFish Studios |
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.IO; | |
using Microsoft.Xna.Framework.Audio; | |
/* | |
* XNA Windows Phone Easy Microphone Access | |
* by Brian MacIntosh for ThunderFish Entertainment/BoneFish Studios | |
* | |
* Version: 1.1 | |
* |
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 Microsoft.Xna.Framework; | |
using Microsoft.Devices.Sensors; | |
/* | |
* XNA Windows Phone Easy Accelerometer Access | |
* by Brian MacIntosh for ThunderFish Entertainment/BoneFish Studios | |
* | |
* Version: 1.0 |
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; | |
class Program | |
{ | |
static void Main(string[] args) | |
{ | |
AngleDegrees angleA = new AngleDegrees(90); | |
AngleRadians angleB = new AngleRadians(Math.PI / 2); | |
// angleA will be implicitly converted to AngleRadians because that's what the method parameter is |
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
//sample code showing how to create a contact listener with | |
//kripken's Javascript port of Box2D.js | |
//https://github.com/kripken/box2d.js/ | |
var gravity = new Box2D.b2Vec2(0.0, 10.0); | |
var world = new Box2D.b2World(gravity); | |
var contactListener = new Box2D.JSContactListener(); | |
contactListener.BeginContact = function(contact) |
NewerOlder