Skip to content

Instantly share code, notes, and snippets.

<?php session_start(); ?>
<script>
if (window.history.replaceState) { window.history.replaceState(null, null, window.location.href); }
</script>
<?php
header('Cache-control: no-cache, must-revalidate, max-age=0');
require('../mediaasset/db.php');
$_SESSION['prmshow'] = "display: none";
/** ...imports... */
export const AccountQuery = gql`
query exampleQuery($id: ID!) {
account(id: $id) {
id
name
addresses(type: [BUSINESS]) {
id
street
void SetupBorderLine(){
var perim = HexPerimeter.FindPerimeterLoop(selectedCity.influencedCells);
var linePositions = HexPerimeter.GetLinePositions(perim);
cityBorderLine.positionCount = linePositions.Count;
for(var c = 0; c < linePositions.Count; c++){
cityBorderLine.SetPosition(c, linePositions[c]);
using System.Collections.Generic;
using System.Linq;
using UnityEngine;
public class HexPerimeter
{
//Convert the cell perim to a list of world coords on the hex border around the cells
public static List<Vector3> GetLinePositions(List<HexCell> cellPerimeter){
var ret = new List<Vector3>();
using System.Collections.Generic;
using System.Linq;
using UnityEngine;
public class HexPerimeter
{
public static List<HexCell> FindPerimeterLoop(List<HexCell> cells){
//start by finding the top right most cell to start a loop from
var startCell = cells.OrderByDescending(t => t.coordinates.Z).ThenByDescending(t => t.coordinates.X).FirstOrDefault();
using UnityEngine;
using System.Collections.Generic;
public class HexCell : MonoBehaviour {
public HexCoordinates coordinates;
HexCell[] neighbors = new HexCell[6];
public HexCell GetNeighbor (HexDirection direction) {
//Find each cities area of influence that flood fills out from each city to a max distance based on the city pop
public Dictionary<HexCell, HexCity> FindCityInfluencedTiles(List<HexCity> cities) {
var frontier = new List<HexCell>();
var costSoFar = new Dictionary<HexCell, int>();
var seed = new Dictionary<HexCell, HexCity>();
//Set the distance to 0 at all start poitns and each start point its own seed
foreach(var city in cities){
frontier.Add(city.Cell);
costSoFar[city.Cell] = 0;
using System;
using System.Collections.Generic;
using TMPro;
using UnityEngine;
public class ScoreChanger : MonoBehaviour {
TMP_Text tmp;
StringChanger stringChanger = new StringChanger();
float timer;
This file has been truncated, but you can view the full file.
Verifying that "dillonshook.id" is my Blockstack ID. https://onename.com/dillonshook