public Behavior(Entity entity) { _SelfUpdater = new Utility.Updater(); _SelfUpdater.Add(this); _Entity = entity; _Machine = new Utility.StageMachine(); }
public User() { _Updater = new Regulus.Utility.Updater(); _ConnectProvider = new Regulus.Remoting.Ghost.TProvider <TestNativeGameCore.IConnect>(); _Connecter = new Connect(); _Complex = new Regulus.Remoting.Ghost.Native.Agent(); }
internal void Run() { Console.WriteLine("用摸的RPG"); Console.WriteLine("系統啟動..."); Regulus.Utility.Singleton<Regulus.Utility.ConsoleLogger>.Instance.Launch("SamebestKeys"); Regulus.Utility.Updater<Regulus.Utility.IUpdatable> frameworkRoot = new Regulus.Utility.Updater<Regulus.Utility.IUpdatable>(); bool userRunning = true; var user = _CreateUser(frameworkRoot); user.Quit += () => { userRunning = false; }; _CreateRandomBot(frameworkRoot); _CreateStageBot(frameworkRoot); while (userRunning) { frameworkRoot.Update(); } frameworkRoot.Shutdown(); Console.WriteLine("系統關閉..."); Regulus.Utility.Singleton<Regulus.Utility.ConsoleLogger>.Instance.Shutdown(); Console.WriteLine("關閉完成."); }
static void Main(string[] args) { Regulus.Utility.Console.IViewer viwer = new Regulus.Utility.ConsoleViewer(); var input = new Regulus.Utility.ConsoleInput(viwer); TestNativeUser.Application appliaction = new TestNativeUser.Application(viwer, input); var app = new Appliaction(appliaction, viwer); Regulus.Utility.Updater updater = new Regulus.Utility.Updater(); appliaction.SetLogMessage(Regulus.Utility.Console.LogFilter.All); updater.Add(app); updater.Add(appliaction); bool exit = false; appliaction.Command.Register("quit", () => { exit = true; }); while (exit == false) { input.Update(); updater.Update(); } appliaction.Command.Unregister("quit"); }
static void Main(string[] args) { Regulus.Utility.Console.IViewer viwer = new Regulus.Utility.ConsoleViewer(); var input = new Regulus.Utility.ConsoleInput(viwer); var server = new Regulus.Remoting.Soul.Native.Application(viwer, input); Regulus.Utility.Updater<Regulus.Utility.IUpdatable> updater = new Regulus.Utility.Updater<Regulus.Utility.IUpdatable>(); updater.Add(server); bool exit = false; server.Command.Register("quit", () => { exit = true; }); _Initial(server); while (exit == false) { updater.Update(); input.Update(); } server.Command.Unregister("quit"); updater.Shutdown(); }
public User() { _Updater = new Regulus.Utility.Updater<Regulus.Utility.IUpdatable>(); _ConnectProvider = new Regulus.Remoting.Ghost.TProvider<TestNativeGameCore.IConnect>(); _Connecter = new Connect(); _Complex = new Regulus.Remoting.Ghost.Native.Agent(); }
public RemotingUser() { _Complex = new Regulus.Remoting.Ghost.Native.Agent(); _Updater = new Regulus.Utility.Updater(); _Connect = new ClientUser.Connect(_Complex); }
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(); }
public Console(IEnumerable <Type> watch_types, Regulus.Utility.Console.IViewer view, Regulus.Utility.Console.IInput input) : base(view, input) { _WatchTypes = watch_types.Union(new Type[0]).ToArray(); _Users = new List <User>(); _Updater = new Utility.Updater(); _Register = new AgentCommandRegister(Command); }
public RemotingController(Regulus.Utility.Command command, Regulus.Utility.Console.IViewer view) { _View = view; _User = new User(); _Updater = new Regulus.Utility.Updater(); _Command = command; }
public Complex(IStorage stroage) { _Time = new LocalTime(); _Hall = new Hall(); _World = new World(LocalTime.Instance); _Updater = new Utility.Updater<Utility.IUpdatable>(); _Storage = stroage; }
public Map(string name,Regulus.Remoting.ITime time) { _Updater = new Utility.Updater(); _Id = Guid.NewGuid(); _Name = name; _SetTime(time); _Session = new Session.Session(); }
void Regulus.Framework.ILaunched.Launch() { _Frameworks = new Regulus.Utility.Updater<Regulus.Utility.IUpdatable>(); _Maps = new List<Map>(); _AddMap(_BuildMap("Ferdinand")); _AddMap(_BuildMap("Chasel")); }
public Complex(IStorage stroage) { _Time = new LocalTime(); _Hall = new Hall(); _World = new World(LocalTime.Instance); _Updater = new Utility.Updater(); _Storage = stroage; _TimeCounter = new Utility.TimeCounter(); }
static void Main(string[] args) { var view = new Regulus.Utility.ConsoleViewer(); var input = new Regulus.Utility.ConsoleInput(view); var application = new Regulus.Project.SamebestKeys.Console(view, input); _BuildGameData(view); BotSet bots = new BotSet(); application.SetLogMessage(Regulus.Utility.Console.LogFilter.All); Regulus.Utility.Updater updater = new Regulus.Utility.Updater(); updater.Add(application); updater.Add(input); updater.Add(bots); bool exit = false; application.Command.Register("quit", () => { exit = true; }); application.Command.Register<string,int>("SetBotIp", (ip,port) => { Bot.Port = port; Bot.IpAddress = ip; }); application.Command.Register<int>("BotSn", (sn) => { bots.Sn = sn; }); application.Command.Register<int>("Bot", (count) => { bots.Create(count); }); application.SelectSystemEvent += (selector) => { var value = selector.Use("remoting"); value.OnValue += _SpawnController; value.OnValue += (requester) => { bots.Requester = requester; }; }; Regulus.Utility.TimeCounter fps = new Regulus.Utility.TimeCounter(); ; while (exit == false) { updater.Update(); fps.Reset(); } application.Command.Unregister("SetBotIp"); application.Command.Unregister("BotSn"); application.Command.Unregister("Bot"); application.Command.Unregister("quit"); application.Stop(); }
public Scene(Team team, Zone zone, Remoting.Time time , bool need_recovery) { _Team = team; _Id = Guid.NewGuid(); this._Zone = zone; this._Time = time; _Updater = new Utility.Updater(); _NeedRecover = need_recovery; }
public Service(IBinderProvider entry, IProtocol protocol) { _Users = new System.Collections.Generic.List <User>(); this._Entry = entry; this._Protocol = protocol; _Updater = new Utility.Updater(); _Updater.AddEvent += (user) => _Entry.AssignBinder(((User)user).Binder, ((User)user).State); _ThreadUpdater = new ThreadUpdater(_Update); _ThreadUpdater.Start(); }
public RealmStage(Regulus.Remoting.ISoulBinder binder, IScene realm, Regulus.Project.SamebestKeys.Serializable.DBEntityInfomation[] actors, Belongings belongings) { _Binder = binder; this._Scene = realm; _Players = (from actor in actors select new Player(actor)).ToArray(); _Observeds = new List<IObservedAbility>(); _Belongings = belongings; _Updater = new Utility.Updater(); }
public Levels(MapPrototype map_prototype, Squad squad) { _Position = 0.0f; _Id = Guid.NewGuid(); this._MapPrototype = map_prototype; _Stations = new Queue<Station>(_MapPrototype.Stations); _StageMachine = new Regulus.Utility.StageMachine(); _Platoon = new Platoon(squad); _Platoon.EmptyEvent += () => { ReleaseEvent(); }; _Platoons = new Utility.Updater(); ; }
static void Main(string[] args) { var view = new Regulus.Utility.ConsoleViewer(); var input = new Regulus.Utility.ConsoleInput(view); var application = new Regulus.Project.SamebestKeys.Console(view, input); BotSet bots = new BotSet(); application.SetLogMessage(Regulus.Utility.Console.LogFilter.All); Regulus.Utility.Updater<Regulus.Utility.IUpdatable> updater = new Regulus.Utility.Updater<Regulus.Utility.IUpdatable>(); updater.Add(application); updater.Add(input); updater.Add(bots); bool exit = false; application.Command.Register("quit", () => { exit = true; }); application.Command.Register<int>("Bot", (count) => { bots.Create(count); }); application.SelectSystemEvent += (selector) => { var value = selector.Use("remoting"); value.OnValue += _SpawnController; value.OnValue += (requester) => { bots.Requester = requester; }; }; Regulus.Utility.TimeCounter fps = new Regulus.Utility.TimeCounter(); ; while (exit == false) { if (fps.Second > 1.0 / 60) { updater.Update(); fps.Reset(); } } application.Command.Unregister("Bot"); application.Command.Unregister("quit"); application.Stop(); }
static void Main(string[] args) { Regulus.Utility.Console.IViewer viwer = new Regulus.Utility.ConsoleViewer(); var input = new Regulus.Utility.ConsoleInput(viwer); var server = new Regulus.Remoting.Soul.Native.Application(viwer, input); Regulus.Utility.Updater <Regulus.Utility.IUpdatable> updater = new Regulus.Utility.Updater <Regulus.Utility.IUpdatable>(); updater.Add(server); bool exit = false; server.Command.Register("quit", () => { exit = true; }); while (exit == false) { updater.Update(); input.Update(); } server.Command.Unregister("quit"); }
static void Main(string[] args) { System.Reflection.Assembly.LoadFrom("GameCore.dll"); var view = new Regulus.Utility.ConsoleViewer() as Regulus.Utility.Console.IViewer; var input = new Regulus.Utility.ConsoleInput(view); var application = new Terry.Project.User.ClientUserFramework(view, input); Regulus.Utility.Updater updater = new Regulus.Utility.Updater(); updater.Add(application); updater.Add(input); bool exit = false; application.Command.Register("quit", () => { exit = true; }); application.Command.Register("sp", () => { application.Command.Run("spawncontroller" , new string[]{"1"}); }); application.Command.Register("sl", () => { application.Command.Run("selectcontroller", new string[] { "1" }); }); while(exit == false) { updater.Update(); } updater.Shutdown(); }
static void Main(string[] args) { bool exit = false; Regulus.Utility.ConsoleViewer view = new Regulus.Utility.ConsoleViewer(); Regulus.Utility.ConsoleInput input = new Regulus.Utility.ConsoleInput(view); Imdgame.RunLocusts.Client client = new Imdgame.RunLocusts.Client(view, input); Regulus.Utility.Updater updater = new Regulus.Utility.Updater(); client.Command.Register("quit", () => { exit = true; }); updater.Add(client); updater.Add(input); while (exit == false) { updater.Update(); } updater.Shutdown(); }
void Regulus.Game.IStage.Enter() { var team1 = new Team(TeamSide.Left,_Platoon); var enemys = (from enemy in _Prototype.Enemys select new Teammate(new ActorInfomation() { Exp = 0, Prototype = enemy })).ToArray(); var platoonEnemy = new Platoon(new Squad(Contingent.FormationType.Auxiliary, enemys , new AIController())); var team2 = new Team(TeamSide.Right, platoonEnemy); _Combat.Initial(team1, team2); _Combat.WinnerEvent += (winner) => { if (winner == team1) ResultEvent(Result.Victory); else ResultEvent(Result.Failure); }; _Combat.DrawEvent += () => { ResultEvent(Result.Failure); }; _Platoons = new Utility.Updater<Platoon>(); _Platoons.Add(platoonEnemy); }
public BotSet() { _Users = new Regulus.Utility.Updater(); }
public Appliaction(TestNativeUser.Application appliaction, Regulus.Utility.Console.IViewer view) { _Bots = new Regulus.Utility.Updater(); this._Appliaction = appliaction; _View = view; }
public Appliaction(TestNativeUser.Application appliaction , Regulus.Utility.Console.IViewer view) { _Bots = new Regulus.Utility.Updater(); this._Appliaction = appliaction; _View = view; }
public Hall() { _Users = new Regulus.Utility.Updater(); }
public Game(IStorage stroage) { _Zone = new Zone(); _Storage = stroage; _Update = new Utility.Updater(); }
public Complex() { _Stroage = null; _Updater = new Utility.Updater(); _Hall = new Hall(); }
public Hall() { _FrameworkRoot = new Regulus.Utility.Updater<Regulus.Utility.IUpdatable>(); }
public OnlineStage(Regulus.Standalong.Agent agent , Regulus.Remoting.Ghost.TProvider<Project.SamebestKeys.IOnline> provider , Regulus.Projects.SamebestKeys.Standalong.Game game) { _Game = game; _Updater = new Utility.Updater(); _Agent = agent; _Id = Guid.NewGuid(); _Provider = provider; }
public Zone(Map[] maps) { _Maps = maps; _Updater = new Utility.Updater(); }
public Game() { _Stroage = new Stroage(); _Complex = new Regulus.Project.SamebestKeys.Complex(_Stroage); _Updater = new Utility.Updater(); }
public ComplexServer() { _Storage = new Storage(); _Complex = new Complex(_Storage); _Updater = new Utility.Updater(); }
public ActorPropertyAbility(Serializable.EntityPropertyInfomation property , Serializable.EntityLookInfomation look) { _Property = property; _Look = look; _Mode = ActorMode.Explore; _Updater = new Utility.Updater(); _ExpendEnergy = false; }