Social cocos2d-x javascript
Oficial forum: http://discuss.cocos2d-x.org/c/cocos2d-x/javascript
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
public class ChickenPoolController : MonoBehaviour | |
{ | |
// holds the pool of chickens | |
private List<Chicken> chickenPool = new List<Chicken>(); | |
// Size of the pool | |
[SerializeField] |
import { Room, Client } from "colyseus"; | |
import { Schema, type, MapSchema } from "@colyseus/schema"; | |
export class Player extends Schema { | |
@type("number") score = 0; | |
} | |
export class State extends Schema { | |
@type("string") currentTurn: string; | |
@type({ map: Player }) |
var canvas = document.getElementById("renderCanvas"); | |
var engine = null; | |
var scene = null; | |
var sceneToRender = null; | |
var createDefaultEngine = function () { | |
return new BABYLON.Engine(canvas, true, { | |
preserveDrawingBuffer: true, | |
stencil: true, | |
}); | |
}; |
var canvas = document.getElementById("renderCanvas"); | |
var engine = null; | |
var scene = null; | |
var sceneToRender = null; | |
var createDefaultEngine = function () { | |
return new BABYLON.Engine(canvas, true, { | |
preserveDrawingBuffer: true, | |
stencil: true, | |
}); | |
}; |
//Prototype Pattern | |
function car (manufacturer, engineType, transmission) { | |
this.manufacturer = manufacturer; | |
this.engineType = engineType; | |
this.transmission = transmission; | |
this.showManufacturer = function() { | |
console.log("Manufacturer is: "+this.manufacturer); | |
} |
{ | |
"marvel": [ | |
{ | |
"id": 1, | |
"superhero_name": "Deadpool", | |
"real_name": "Wade Wilson", | |
"powers": "Deadpool possesses a superhuman healing factor derived from that of the mutant Wolverine that allows him to regenerate damaged or destroyed areas of his cellular structure" | |
}, | |
{ | |
"id": 2, |
using HoloToolkit.Unity.InputModule; | |
using UnityEngine; | |
using IInputHandler = HoloToolkit.Unity.InputModule.IInputHandler; | |
using IManipulationHandler = HoloToolkit.Unity.InputModule.IManipulationHandler; | |
public class Scale : MonoBehaviour, IInputHandler, IManipulationHandler | |
{ | |
private IInputSource currentInputSource = null; | |
private uint currentInputSourceId; | |
private Vector3 currentScale; |
using HoloToolkit.Unity.InputModule; | |
using UnityEngine; | |
using IInputHandler = HoloToolkit.Unity.InputModule.IInputHandler; | |
using IManipulationHandler = HoloToolkit.Unity.InputModule.IManipulationHandler; | |
public class Rotate : MonoBehaviour, IInputHandler, IManipulationHandler | |
{ | |
private IInputSource currentInputSource = null; | |
private uint currentInputSourceId; |
using UnityEngine; | |
public class AndroidCallBacks : MonoBehaviour { | |
private string yes = "0"; | |
private string no = "1"; | |
// Use this for initialization | |
void Start () { | |