This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| std::vector<Player> players (MAX_CONNECTIONS); | |
| // pull out the type of messages sent by our config | |
| typedef server::message_ptr message_ptr; | |
| // Define a callback to handle incoming messages | |
| void on_message(server* s, websocketpp::connection_hdl hdl, message_ptr msg) { | |
| std::cout << "on_message called with hdl: " << hdl.lock().get() | |
| << " and message: " << msg->get_payload() | |
| << std::endl; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| if (Input.touchCount > 0) { | |
| Ray touchray = Camera.main.ScreenPointToRay (Input.GetTouch (0).position); | |
| Debug.DrawRay (touchray.origin, touchray.direction, Color.yellow, 5.0f); | |
| } | |
| Ray ray = Camera.main.ScreenPointToRay (Input.mousePosition); | |
| Debug.DrawRay (ray.origin, ray.direction, Color.green, 5.0f); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var client = require('./client.js')('127.0.0.1', 3000); | |
| client.sendMessage("new_player"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <ctime> | |
| #include <iostream> | |
| #include <string> | |
| #include <boost/array.hpp> | |
| #include <boost/bind.hpp> | |
| #include <boost/shared_ptr.hpp> | |
| #include <boost/asio.hpp> | |
| using boost::asio::ip::udp; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Type GetType(string name) | |
| { | |
| foreach(KeyValuePair<string, Type> script in scripts) | |
| { | |
| if(script.Key == name) | |
| { | |
| return script.Value; | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Arduino: 1.6.9 (Windows 10), Board: "ATtiny x313 series, ATtiny2313, 1 MHz (internal), B.O.D. Disabled, no" | |
| Build options changed, rebuilding all | |
| In file included from C:\arduino-1.6.9\libraries\IRremote\IRremote.h:24:0, | |
| from C:\arduino-1.6.9\libraries\IRremote\irRecv.cpp:1: | |
| C:\arduino-1.6.9\libraries\IRremote\irRecv.cpp: In member function 'void IRrecv::enableIRIn()': |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| consoleView = new GameObject(); | |
| consoleView.layer = 5; // UI | |
| consoleView.name = "ConsoleView"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| loader.createInstance = (Type t) => | |
| { | |
| bool found = false; | |
| string fileName = t.ToString() + ".cs"; | |
| foreach (var mod in modLoader.mods) { | |
| string modPath = mod.path + "/Scripts/"; | |
| foreach (var script in mod.scripts) { | |
| string shortPath = script.Substring(modPath.Length); | |
| if(shortPath == fileName) { | |
| if(typeof(Component).IsAssignableFrom(t)){ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| loader.createInstance = (Type t) => | |
| { | |
| string fileName = t.ToString() + ".cs"; | |
| Debug.Log(t.GetType()); | |
| foreach (var mod in modLoader.mods) { | |
| string modPath = mod.path + "/Scripts/"; | |
| foreach (var script in mod.scripts) { | |
| string shortPath = script.Substring(modPath.Length); | |
| if(shortPath == fileName) { | |
| Debug.Log("found a match: '" + fileName + "' is from Mod: '" + mod.name + "'"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| loader.destroyInstance = (object instance) => DestroyObject (instance); | |
| public void DestroyObject(object instance) { | |
| if (instance is Component) | |
| Destroy (instance as Component); | |
| } |