Skip to content

Instantly share code, notes, and snippets.

View Chronojam's full-sized avatar
💭
I will not rest until nodejs is destroyed

Calliope Gardner Chronojam

💭
I will not rest until nodejs is destroyed
  • GitLab
  • Bristol, United Kingdom
View GitHub Profile
LoadHTML(@"
<html>
<body style='font-family: Helvetica, Arial, sans-serif;'>
<h1>Awesomium Rocks!</h1>
<p>This web-page was loaded with HTML directly from within Unity3D.</p>
<h2>Environment Info</h2>
<dl>
<dt>Unity Version</dt><dd id='stat1'></dd>
<dt>Unity Platform</dt><dd id='stat2'></dd>
base.initialURL = "about:blank";
base.Start();
CreateJSObject("App");
SetJSObjectProperty("App", "unityVersion", new JSValue(Application.unityVersion));
SetJSObjectProperty("App", "unityPlatform", new JSValue(Application.platform.ToString()));
SetJSObjectProperty("App", "insideEditor", new JSValue(Application.isEditor));
BindJSObjectCallback("App", "quit", OnQuitPressed);
WebSocketServer _webSocket;
List<IWebSocketConnection> openConnections = new List<IWebSocketConnection>();
public int port;
// Use this for initialization
public JavascriptGameInterface()
{
//port = (int)UnityEngine.Random.Range(50000, 65000);
_webSocket = new WebSocketServer("ws://localhost:8182");
//Debug.Log(port);
@"
<html>
<body style='font-family: Helvetica, Arial, sans-serif;'>
<h1>Awesomium Rocks!</h1>
<p>This web-page was loaded with HTML directly from within Unity3D.</p>
<h2>Environment Info</h2>
<dl>
<dt>Unity Version</dt><dd id='stat1'></dd>
<dt>Unity Platform</dt><dd id='stat2'></dd>
@Chronojam
Chronojam / gist:8506797
Created January 19, 2014 15:58
Urgh movement.
if (Ship.transform.position.x > (activeChunkPosition.x * ChunkSize) + ChunkSize/4) {
// Make a new chunk in the direction we're going.
GenerateChunk((activeChunkPosition.x + 1), activeChunkPosition.y, activeChunkPosition.z);
try {
//Clean up chunks behind us.
DeleteChunk (Chunks[new Vector3(activeChunkPosition.x - 2, activeChunkPosition.y, activeChunkPosition.z)]);
}
catch {
Debug.Log ("Just tried to delete a chunk, but we havent made it yet!");
}
.h
#pragma once
#include "Ship_Component_Interface.generated.h"
/**
*
*/
UINTERFACE(MinimalAPI)
class UShip_Component_Interface : public UInterface
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: "{{ name }}"
labels:
name: "{{ name }}"
spec:
replicas: 1
template:
apiVersion: v1
kind: Service
metadata:
name: "{{ name }}"
spec:
selector:
app: "{{ name }}"
type: LoadBalancer
ports:
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: "{{ name }}"
spec:
tls:
- secretName: {{ secretName }}
rules:
- host: {{ hostname }} # eg example.com