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
public class Triangulator | |
{ | |
private List<Vector2> m_points = new List<Vector2>(); | |
public Triangulator (Vector2[] points) { | |
m_points = new List<Vector2>(points); | |
} | |
public int[] Triangulate() { | |
List<int> indices = new List<int>(); |
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 System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
public class ObjectMovmentOnWayPoints : MonoBehaviour | |
{ | |
#region Vars | |
public List<GameObject> movmentWayPoints; |
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
// This work is licensed under the Creative Commons Attribution-ShareAlike 4.0 International License. | |
// To view a copy of this license, visit http://creativecommons.org/licenses/by-sa/4.0/ | |
// or send a letter to Creative Commons, PO Box 1866, Mountain View, CA 94042, USA. | |
using System; | |
using System.Collections; | |
using System.Collections.Generic; | |
using System.Net.Sockets; | |
using System.Text; | |
using System.Threading; | |
using UnityEngine; |
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 System.Collections.Generic; | |
using UnityEngine; | |
using UnityEditor; | |
using System.IO; | |
public static class PrefabLoader | |
{ | |
//So, there's no "load all assets in directory" function in unity. | |
//I guess this is to avoid people using Prefabs as "data blobs". | |
//They'd rather you use ScriptableObjects... which is fine in some cases, |
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
/* | |
Very simple example using LINQ to SQL and based on the MSDN LINQ to SQL page. | |
Make sure you include System.Data.Linq and System.Data.Linq.Mappings in your usings. | |
*/ | |
// Table you want to associate with the entity | |
[Table(Name="Customer")] | |
public class Customer | |
{ | |
// Columns in the database. Should have the same name between database and class variable |