public void Set(Regulus.Project.ItIsNotAGame1.Data.Item item) { _Item = item; Name.text = item.Count.ToString(); Image.sprite = (Sprite)UnityEngine.Resources.Load("Icon/Item/" + _Item.Name , typeof(Sprite)); }
private static void _Initial(Regulus.Remoting.Soul.Native.Application application) { application.SelectSystemEvent += (selector) => { _Spawn(selector.Use("stand")); }; }
private void _ToInGameState(Regulus.Remoting.ISoulBinder provider) { InGameState inGameState = new InGameState(provider); StageMachine.Push(inGameState); inGameState.OnBackLoginEvent += () => { _ToLoginState(provider); }; }
public StageRun(Regulus.Game.ICore core,Utility.Command command,int port , Utility.Console.IViewer viewer) { _View = viewer; this._Command = command; _ThreadSocketHandler = new ThreadSocketHandler(port, core); _ThreadSocket = new System.Threading.Thread(_ThreadSocketHandler.DoWork); }
void Regulus.Remoting.PhotonExpansion.IPhotonFramework.ObtainController(Regulus.Remoting.Soul.SoulProvider provider) { var soul = new CTestSoul(); provider.Bind<TestRemotingCommon.ITest>(soul); soul.invoke(); //provider.Unbind<TestRemotingCommon.ITest>(soul); }
public TcpController(Regulus.Utility.Command command, Regulus.Utility.Console.IViewer view) { _Command = command; _View = view; _Machine = new Game.StageMachine(); }
internal void Update(IObserveAbility observe, Regulus.Project.TurnBasedRPG.Map.EntityInfomation[] entitys, List<IObservedAbility> lefts) { foreach (var exit in lefts) { _Remove(_Within, exit.Id); if (LeftEvent != null) LeftEvent(exit); } foreach(var e in entitys.Except(_Within)) { if (e.Observed != null) { if (IntoEvent != null) IntoEvent(e.Observed); } } foreach (var e in _Within.Except(entitys)) { if (e.Observed != null) { if (LeftEvent != null) LeftEvent(e.Observed); } } _Within = entitys.ToList(); }
public ConnectStage(Regulus.Remoting.Ghost.TProvider<Project.SamebestKeys.IConnect> connect_provider, OnConnect connect) { // TODO: Complete member initialization this._ConnectProvider = connect_provider; _Connect = connect; _Connecter = new Connect(); }
public BotConnectStage(Regulus.Project.SamebestKeys.IUser _User, string ip, int port) { // TODO: Complete member initialization this._User = _User; this.ip = ip; this.port = port; }
//private void _ToConnectState(Regulus.Remoting.ISoulBinder provider) //{ //ConnectStates connectState = new ConnectStates(provider); //StageMachine.Push(connectState); //connectState.OnDoneEvent += () => { _ToLoginState(provider); }; //} private void _ToLoginState(Regulus.Remoting.ISoulBinder provider) { LoginStates loginState = new LoginStates(provider); StageMachine.Push(loginState); loginState.OnDoneEvent += () => { _ToInGameState(provider); }; }
public Regulus.Project.Crystal.Game.Core CreateUser(Regulus.Remoting.ISoulBinder binder, IStorage storage, IMap zone , Battle.IZone battle) { var core = new Regulus.Project.Crystal.Game.Core(binder, storage, zone, battle); _Users.AddFramework(core); core.InactiveEvent += () => { _Users.RemoveFramework(core); }; return core; }
public VerifyStage(string _Account, string _Password, Regulus.Remoting.INotifier<Regulus.Project.ItIsNotAGame1.Data.IVerify> providerNotice) { // TODO: Complete member initialization this._Account = _Account; this._Password = _Password; this._Provider = providerNotice; }
private void _ToListen(Regulus.Remoting.Soul.Native.Server server) { var stage = new HostListenStage(server); stage.DoneEvent += _ToSetting; _DrawWindow = stage.DrawWindow; _Machine.Push(stage); }
private Regulus.Project.TurnBasedRPG.Data.Entity _Build(Regulus.Project.TurnBasedRPG.Data.StaticEntity entity, GameObject game_object) { var bc = game_object.GetComponent<BoxCollider>(); if (bc != null) { float x = game_object.transform.position.x; float y = game_object.transform.position.z; float w = game_object.transform.localScale.x * bc.size.x; float h = game_object.transform.localScale.z * bc.size.z; float r = game_object.transform.rotation.eulerAngles.y; Debug.Log("x" + x + " " + "y" + y + " " + "w" + w + " " + "h" + h + " " + "r" + r + " "); var obb = new Regulus.Utility.OBB(x, y, w, h); obb.setRotation(r); entity.Obb = obb; return _Build(entity as Regulus.Project.TurnBasedRPG.Data.Entity, game_object); } throw new System.Exception("BoxCollider is null " + game_object.name); }
void _Observed_ShowActionEvent(Regulus.Project.SamebestKeys.Serializable.MoveInfomation obj) { if (obj.Speed == 0) { _Player.Walk(Regulus.Utility.Random.Next(0, 360),0); } }
public User(Regulus.Remoting.Soul.SoulProvider provider , Regulus.Project.TurnBasedRPG.UserRoster user_roster , IWorld world) { _UserRoster = user_roster; _Machine = new Regulus.Game.StageMachine<User>(this); Provider = provider; provider.BreakEvent += Quit; _World = world; }
public User(Regulus.Remoting.IAgent agent) { _Agent = agent; _ConnectProvider = new Regulus.Remoting.Ghost.TProvider<Regulus.Utility.IConnect>(); _OnlineProvider = new Regulus.Remoting.Ghost.TProvider<Regulus.Utility.IOnline>(); _Machine = new Regulus.Utility.StageMachine(); _Updater = new Regulus.Utility.Updater(); }
void PlayerProvider_Supply(Regulus.Project.SamebestKeys.IPlayer obj) { _Player = obj; _Player.SetPosition(Regulus.Utility.Random.Next(0 , 30), Regulus.Utility.Random.Next(0, 30)); _Player.SetSpeed(1); _Player.Walk(Regulus.Utility.Random.Next(0,360)); _TimeCounter.Reset(); }
public void CreateUserInstance(Regulus.Remoting.ISoulBinder provider) { User user = new User(provider); _UserSet.Add(user); provider.BreakEvent += () => { _UserSet.Remove(user); }; }
private UserController _CreateUser(Regulus.Utility.Updater<Regulus.Utility.IUpdatable> frameworkRoot) { Console.WriteLine("建立使用者."); UserController user = new UserController(); frameworkRoot.Add(user); return user; }
private void InventoryNotifierProvider_Supply(Regulus.Project.ItIsNotAGame1.Data.IInventoryNotifier obj) { _ReleaseNotifier(); _InventoryNotifier = obj; _InventoryNotifier.RemoveEvent += _RemoveItem; _InventoryNotifier.AddEvent += _AddEvent; }
public Service(Regulus.Remoting.ISoulBinder binder, Storage storage , int account_id) { // TODO: Complete member initialization this._Binder = binder; this._Storage = storage; _Id = account_id; }
void Regulus.Game.ICore.ObtainController(Regulus.Remoting.ISoulBinder binder) { binder.Bind<TestNativeGameCore.IMessager>(this); binder.BreakEvent += () => { binder.Unbind<TestNativeGameCore.IMessager>(this); }; }
public void SetPosision(Regulus.CustomType.Vector2 position) { _Target = new Vector2(position.X , position.Y ); /*var scaleX = _Rect.localScale.x; var scaleY = _Rect.localScale.y; _Rect.anchoredPosition = new Vector2(-position.X * scaleX + Viewport.rect.width / 2, -position.Y * scaleY + Viewport.rect.height / 2);*/ }
private static void _Export(Regulus.Utility.Console.IViewer view, Wheel wheel) { var data = wheel.Export(); var guid = System.Guid.NewGuid(); var path = $"Export{guid}.txt"; view.WriteLine(path); System.IO.File.WriteAllText(path, Newtonsoft.Json.JsonConvert.SerializeObject(data)); }
public User(Remoting.ISoulBinder provider, Regulus.Project.SamebestKeys.UserRoster user_roster, IWorld world , IStorage storage) { _Storage = storage; _UserRoster = user_roster; _Machine = new Regulus.Game.StageMachine<User>(this); Provider = provider; provider.BreakEvent += Quit; _World = world; }
public Map(string name,Regulus.Remoting.ITime time) { _Updater = new Utility.Updater(); _Id = Guid.NewGuid(); _Name = name; _SetTime(time); _Session = new Session.Session(); }
void _Connect_ConnectedEvent(string account, int password, Regulus.Remoting.Value<bool> result) { Regulus.Remoting.Value<bool> r = _Agent.Connect(account, password); r.OnValue += (success) => { DoneEvent(); result.SetValue(success); }; }
void _OnConnect(string ipaddr, int port, Regulus.Remoting.Value<bool> result) { var value = _Connect(ipaddr , port); value.OnValue += (ret) => { result.SetValue(ret); ResultEvent(ret); }; }
public BatchCommander(Regulus.Utility.Command command) { _Timer = new Regulus.Utility.TimeCounter(); this._Command = command; _Command.Register("1" , _1); _CommandStrings = new Queue<CommandString>(); }