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 = new Faye.Client('http://localhost:3000/faye'); | |
var subscription = client.subscribe('/foo', function(message) { | |
alert(message) | |
}); |
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
<html> | |
<head> | |
<script type="text/javascript" src="http://localhost:3000/faye/client.js"> </script> | |
<script src="index.js" ></script> | |
</head> | |
<body> | |
<div id="test"> | |
</div> | |
</body> |
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
config.middleware.use FayeRails::Middleware, mount: '/faye', :timeout => 25 |
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
gem 'faye-rails' | |
gem 'eventmachine' | |
gem 'faye' | |
gem 'thin' | |
gem 'faye-redis' |
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
version: '2.1' | |
services: | |
transactions-service: | |
build: TransactionsService/ | |
expose: | |
- 3003 | |
ports: | |
- 3003:3003 | |
analytics-service: |
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
{ | |
"merchant": { | |
"id": "scene_0_merchant_1_53525", | |
"name": "Jasper", | |
"race": 0, | |
"inventory": { | |
"id": "inventory_14141414", | |
"type": "weaponary", | |
"items": [ | |
{ |
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
using UnityEngine; | |
public class MerchantBehaviour : MonoBehaviour, IMerchant | |
{ | |
[SerializeField] | |
private InventoryBehaviour inventoryBehaviour; | |
[SerializeField] | |
private MerchantRaces race; |
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
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
public class InventoryBehaviour : MonoBehaviour, IInventory { | |
public string Id { get; private set; } | |
public InventoryTypes InventoryType { get; private set; } | |
public IEnumerable<IItem> Items { get; private set; } | |
} |
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
public enum MerchantRaces | |
{ | |
Khajit, | |
Dragonborn, | |
Dogjit, | |
CheeseEat | |
} | |
public interface IMerchant { | |
string Id { get; } |
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
using System.Collections.Generic; | |
public enum InventoryTypes | |
{ | |
Medic, | |
Weaponary, | |
Bartender | |
} | |
public interface IInventory |