Created
March 26, 2016 13:32
-
-
Save OlegJakushkin/17da758601aac5bf62a7 to your computer and use it in GitHub Desktop.
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.Collections.Generic; | |
using Accord.MachineLearning.Structures; | |
public class Controller : MonoBehaviour { | |
private readonly Dictionary<Vector3, Informer> map = new Dictionary<Vector3, Informer>(); | |
private readonly KDTree<Informer> tree = new KDTree<Informer> (); | |
public void RegisterInformer(Informer informer) { | |
var position = informer.transform.position; | |
map.Add (position, informer); | |
Debug.Log ("Informer added at: " + position); | |
tree.Add (position, informer); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment