August 2018
Beginner
334 pages
10h 19m
English
We will just implement a new file:
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
public class VisorGraph : MonoBehaviour
{
public int visionReach;
public GameObject visorObj;
public Graph visionGraph;
}
void Start()
{
if (visorObj == null)
visorObj = gameObject;
}
public bool IsVisible(int[] visibilityNodes) { int vision = visionReach; int src = visionGraph.GetNearestVertex(visorObj); HashSet<int> visibleNodes = new HashSet<int>(); Queue<int> queue = new Queue<int>(); queue.Enqueue(src); } ...Read now
Unlock full access