internal void Initial() { var client = new Regulus.Framework.Client <VGame.Project.FishHunter.IUser>(this.Console, this.Console); client.ModeSelectorEvent += _ModeSelector; _Updater.Add(client); _Updater.Add(_Standalone); }
// Use this for initialization void Start() { Mode = SceneChanger.Mode; Application.logMessageReceived += _Log; #if !UNITY_STANDALONE_WIN Regulus.Utility.SpinWait.NotWindowsPlatform(); #endif var client = new Regulus.Framework.Client <Regulus.Project.ItIsNotAGame1.IUser>(Console, Console.Command); client.ModeSelectorEvent += _ToMode; _Client = client; _Updater.Add(_Client); Debug.Log("Started ."); }
public Task Add(TimeSpan interval, Action <long> time_up) { var task = new Task(interval, time_up); _Tasks.Add(task); return(task); }
void IBootable.Launch() { _Updater.Add(_Behavior); foreach (var entity in _Entitys) { _Gate.Join(entity); } }
void IBootable.Launch() { WindowConsole.SetConsoleCtrlHandler(ConsoleCtrlCheck, true); ShowLog(); _Updater.Add(_Input); _Launch(); }
void _Connect(string ip, int port) { var socket = _Client.Spawn(); IPEndPoint endpoint = new IPEndPoint(IPAddress.Parse(ip), port); socket.Connect(endpoint, (result) => { if (result) { _Updater.Add(new PeerHandler(_Command, _Viewer, socket)); } }); }
protected WindowConsole() { _AutoPowerRegulator = new AutoPowerRegulator(new PowerRegulator()); Viewer = new ConsoleViewer(); ConsoleInput consoleInput = new ConsoleInput(Viewer); _Input = consoleInput; _Console = new Console(_Input, Viewer); _Updater = new Updater(); _Updater.Add(consoleInput); }
void IStage.Enter() { this._DifferenceNoticer.JoinEvent += this._BroadcastJoin; this._DifferenceNoticer.LeftEvent += this._BroadcastLeft; this._Gate.Join(this._Player); this._Binder.Bind <IPlayerProperys>(this); _Binder.Bind <IDevelopActor>(_Player); _Binder.Bind <IEmotion>(this); _ToSurvival(); if (_Behavior != null) { _Updater.Add(_Behavior); } }
protected override void _Launch() { var builder = new Regulus.Protocol.AssemblyBuilder(); var dataAsm = Assembly.LoadFile(System.IO.Path.GetFullPath("ItIsNotAGame1Data.dll")); var asm = builder.Build(dataAsm, "Regulus.Project.ItIsNotAGame1.Protocol"); var protocl = asm.CreateInstance("Regulus.Project.ItIsNotAGame1.Protocol") as IProtocol; var client = new Regulus.Framework.Client <IUser>(this.Viewer, this.Command); throw new NotImplementedException(); client.Selector.AddFactoty("online", new RemotingUserFactory(protocl, null)); _Updater.Add(client); }
private void _Update() { IBinder binder; while (_AddBinders.TryDequeue(out binder)) { var user = _Proviable(binder); binder.BreakEvent += () => { _RemoveBinders.Enqueue(user); }; _Users.Add(user); } IUpdatable removeUser; while (_RemoveBinders.TryDequeue(out removeUser)) { _Users.Remove(removeUser); } _Users.Working(); }
private void _AddFish(FishCollider fish) { _Fishs.Add(new Assets.FishHunter.Script.Pure.FishDeadReleaser(fish)); }
private void _AcceptPeer(IPeer obj) { _Updater.Add(new PeerHandler(_Command, _Viewer, obj)); }
public void CreateServer() { var server = new Listener(new UdpSocket()); _Updater.Add(new ServerHandler(++_Id, server, Command, Viewer)); }