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.
{"label":"","duration":8052.6069929513105,"markers":[{"causeName":"setInterval handler","end":58.43870282320131,"endStack":null,"isOffMainThread":false,"name":"Javascript","processType":2,"stack":1,"start":58.41817629920115,"index":0},{"causeName":"setInterval handler","end":68.41272744010348,"endStack":null,"isOffMainThread":false,"name":"Javascript","processType":2,"stack":2,"start":68.39375595579622,"index":1},{"causeName":"setInterval handler","end":78.92510680011765,"endStack":null,"isOffMainThread":false,"name":"Javascript","processType":2,"stack":3,"start":78.90613531581766,"index":2},{"causeName":"setInterval handler","end":89.42349080287386,"endStack":null,"isOffMainThread":false,"name":"Javascript","processType":2,"stack":4,"start":89.3930120248042,"index":3},{"causeName":"setInterval handler","end":99.48210957929405,"endStack":null,"isOffMainThread":false,"name":"Javascript","processType":2,"stack":5,"start":99.45163080122438,"index":4},{"causeName":"setInterval handler","end":109.90305260512832,"e
Verifying that "dillonshook.id" is my Blockstack ID. https://onename.com/dillonshook