This file contains hidden or 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
| // Author: runevision | |
| // URL: http://wiki.unity3d.com/index.php?title=Triangulator | |
| // Version: http://wiki.unity3d.com/index.php?title=Triangulator&oldid=14208 | |
| // | |
| // Then modified a bit. -NC | |
| using UnityEngine; | |
| using System.Collections.Generic; | |
| using System.Linq; |
This file contains hidden or 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 UnityEditor; | |
| using System.Collections; | |
| [CustomEditor(typeof(Font))] | |
| public class FontEditor : Editor | |
| { | |
| Font m_Font; | |
| static bool m_TilingControlsVisible; |
This file contains hidden or 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
| /* | |
| ** OutlineMesh.cs | |
| */ | |
| //#define DEBUG | |
| using UnityEngine; | |
| using System.Collections; | |
| using System.Collections.Generic; |
This file contains hidden or 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 System.Collections; | |
| using System.Threading; | |
| using SimplexNoise; | |
| public class TerrainGenerator : MonoBehaviour | |
| { | |
| [SerializeField] protected int m_Size = 512; // TODO: Require PoT sizes | |
| [SerializeField] protected float m_Height = 32.0f; |
This file contains hidden or 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 UnityEditor; | |
| using System.Collections; | |
| public class EditorGUITools : GUITools | |
| { | |
| public static void DrawOutlineRect(Rect rect) | |
| { | |
| DrawHorizontalLine(new Vector2(rect.x, rect.y), rect.width); | |
| DrawVerticalLine(new Vector2(rect.x, rect.y), rect.height); |
This file contains hidden or 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 GridContainer | |
| export var connect_on_ready : bool | |
| func _ready() -> void: | |
| if connect_on_ready: | |
| connect_children() | |
This file contains hidden or 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 KinematicBody2D | |
| export(float) var speed := 8.0 | |
| export(float) var jump_impulse := 200.0 | |
| export(float) var max_speed := 200.0 | |
| export(float) var gravity_multiplier := 1.0 | |
| export(float) var snap_length := 5.0 | |
| export(float) var floor_damping := 200.0 |
This file contains hidden or 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
| class_name InventoryPanel | |
| extends PopupDialog | |
| export var item_slot_scene : PackedScene | |
| export var scroll : NodePath | |
| onready var scroll_node : ScrollContainer = get_node(scroll) | |
| export var grid : NodePath |
This file contains hidden or 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
| class_name Pickup | |
| extends RigidBody2D | |
| export(Globals.PickupType) var type : int setget , get_type | |
| export var sprite : NodePath | |
| onready var sprite_node : AnimatedSprite = get_node(sprite) setget , get_sprite | |
| # These should be translated strings, but let's keep it simple for now: |
This file contains hidden or 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
| // Reads the lowest four bits from the input's blue channel and uses them to | |
| // pick a substitute colour from a palette texture. | |
| // | |
| // The palette texture should be 16 pixels wide and 1 pixel high, with the | |
| // colours arranged with index 0 at the left and index 15 at the right. | |
| shader_type canvas_item; | |
| render_mode blend_disabled, unshaded, skip_vertex_transform; | |
| uniform sampler2D palette; |