August 2018
Beginner
334 pages
10h 19m
English
We will build the VertexInfluence and InfluenceMap classes, which are used for handling vertices and the graph, respectively:
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
public class VertexInfluence : Vertex
{
public Faction faction;
public float value = 0f;
}
public bool SetValue(Faction f, float v)
{
bool isUpdated = false;
if (v > value)
{
value = v;
faction = f;
isUpdated = true;
}
return isUpdated;
}
using UnityEngine; using System.Collections.Generic; ...
Read now
Unlock full access