public SplashScreen(GameCore gamecore) : base(gamecore) { int width = gamecore.Window.ClientBounds.Right - gamecore.Window.ClientBounds.Left; int height = gamecore.Window.ClientBounds.Bottom - gamecore.Window.ClientBounds.Top; bt1 = new Button(gamecore, mygame.Content.Load<Texture2D>("Button"), mygame.Content.Load<Texture2D>("labelStart"), mygame.Content.Load<Texture2D>("ButtonS2"), 23, new Vector3(width / 3 - 50, height * 4 / 5, 0), new ScriptBt1(mygame), 1.4f); bt2 = new Button(gamecore, mygame.Content.Load<Texture2D>("Button"), mygame.Content.Load<Texture2D>("labelEject"), mygame.Content.Load<Texture2D>("ButtonS2"), 23, new Vector3(width * 2 / 3 - 50, height * 4 / 5, 0), new ScriptBt2(mygame), 1.4f); addComponent(bt1); addComponent(bt2); bt1.setSelected(true); bg = mygame.Content.Load<Texture2D>("bg"); title = mygame.Content.Load<Texture2D>("labelTitle"); titlepos = new Vector2((width - title.Width) / 2, height / 5); while (width > 0) { width -= 200; int htemp = height; while (htemp > -200) { htemp -= 200; bgpos.Add(new Vector2(width, htemp)); } } szbg = bgpos.Count; }
/// <summary> /// The main entry point for the application. /// </summary> static void Main(string[] args) { using (GameCore game = new GameCore()) { game.Run(); } }
public Explosao(GameCore mygame, Vector3 position, float scale,Screen screen) : base(mygame, mygame.Content.Load<Texture2D>("explosao2"), 10, position, scale) { this.screen = screen; sprite = 1; mygame.sons.playSound(0); }
public static GameEvent Deserialize(string serializedEvent, GameCore core) { var parts = serializedEvent.Substring(ParsingHelper.HeaderSize).Split (';'); int id = int.Parse(parts [0]); return new EndGameEvent(id, core); }
public SpaceShip(GameCore gameRef, Sprite sprite) { this.game = gameRef; this.sprite = sprite; health = new Health(10); guns = new Gun[1]; guns[0] = new Gun(game,77,27); }
public GameContainer(GameCore core, IGameController controller, Environment environment, bool isServer) { GameCore = core; EventFactory = new EventFactory (GameCore); GameController = controller; Environment = environment; _hasEnvironment = isServer; }
public AddBallEvent(int id, GameCore core, int ballId, BallType ballType, int xPos, int yPos) : base(id, GameEventType.AddBall, core) { _ballId = ballId; _ballType = ballType; _xPos = xPos; _yPos = yPos; }
public Label(String text, Vector3 position, GameCore game) : base(game) { this.position = position; this.text = translate(text); if(font==null){ font = new SpriteV(game,game.Content.Load<Texture2D>("letras30x24"),36,Vector3.Zero,1); } }
static void Main(string[] args) { Console.Title = ""; var core = new GameCore(); core.Log.NewMessage += Log_NewMessage; core.Log.NewException += Log_NewException; core.Run(); Console.ReadLine(); }
public RealmClient(GameCore gCore) { GCore = gCore; PManager = new PlayerManager(this); _mManager = new MessageManagerRealm(this); _mManager.InitMessages(); _mManager.Log.NewMessage += Log_NewMessage; _mManager.Log.NewException += Log_NewException; }
public SpriteV(GameCore mygame, Texture2D baseImg, int nsprites, Vector3 position, float scale) : base(mygame, null) { this.baseImg = baseImg; this.nsprites = nsprites; this.wsprites = baseImg.Height / nsprites; this.positionRect = new Rectangle((int)position.X, (int)position.Y, (int)(scale * baseImg.Width), (int)(scale * wsprites)); this.sourceRectangle = new Rectangle(0, 0, baseImg.Width, wsprites); }
public RepositorioDeSons(GameCore mygame) { sounds.Add(mygame.Content.Load<SoundEffect>("explosionSound")); sounds.Add(mygame.Content.Load<SoundEffect>("bigExplosionSound")); sounds.Add(mygame.Content.Load<SoundEffect>("shot")); songs.Add(mygame.Content.Load<Song>("Human nature")); songs.Add(mygame.Content.Load<Song>("Battle mode")); songs.Add(mygame.Content.Load<Song>("bike chase")); MediaPlayer.IsRepeating = true; }
public Tiro(GameCore game, Texture2D image , Vector2 posicao, int velocidade, int dano, ScreenGamePlay screen) : base(game, image) { this.image = image; this.posicao = posicao; this.velocidade = velocidade; this.dano = dano; this.screen = screen; mygame.sons.playSound(2); }
public static GameEvent Deserialize(string serializedEvent, GameCore core) { var parts = serializedEvent.Substring(ParsingHelper.HeaderSize).Split (';'); int id = int.Parse (parts [0]); int ballId = int.Parse (parts[1]); BallType ballType = (BallType)int.Parse (parts[2]); int xPos = int.Parse (parts[3]); int yPos = int.Parse (parts[4]); return new AddBallEvent(id, core, ballId, ballType, xPos, yPos); }
public GameScreen(GraphicsDevice graphicsDevice, ObjectPool Objects, ContentPool Content, GameCore gameCore) { this.Objects = Objects; this.Content = Content; this.ScreenName = "Game"; this.GraphicsDevice = graphicsDevice; this.Batch = new SpriteBatch(GraphicsDevice); testmap = new MapTest(Batch, Content, Objects); weaponEngine = new WeaponEngine.WeaponEngine(Content, Objects); this.gameCore = gameCore; GameStats.CreateStat("KilledEnemies", 0); }
public TiroInimigo(GameCore game, Texture2D image, Vector2 posicao, int velocidade, int dano,int largura, ScreenGamePlay screen) : base(game, image) { this.image = image; this.posicao = posicao; this.velocidade = velocidade; this.dano = dano; this.screen = screen; this.largura = largura; this.altura = image.Height; mygame.sons.playSound(2); }
public MainForm() { // // The InitializeComponent() call is required for Windows Forms designer support. // InitializeComponent(); this.FormBorderStyle = FormBorderStyle.FixedSingle; this.DisplayMenu(); this.Rand = new Random(); this.Pokedex = new Pokedex(); this.Shop = new Shop(); this.GameCore = new GameCore(this.Pokedex, this.Shop); this.comboBox1.SelectedItem = "Pikachu (Type: Electric)"; }
public EventBox(GameCore game, Texture2D background, Vector2 position, Script script) : base(game) { this.script = script; positionBackground = position; imageBackground = background; PositionText = new Vector2(10, 420); file = new StreamReader("Content/DataBase/teste.csv"); // arquivo que contem o csv obs: "isso vai depender do seu projeto" //file = new StreamReader(@"C:\SCP\Project Steel Champions\Content\DataBase\teste.csv"); loadFrases = file.ReadLine(); tipeFont = mygame.Content.Load<SpriteFont>(@"DataBase\TipeFont"); //carrega arquivo do database que comtel o modelo da fonte positionCharacter = new Vector2(-300, 200); imageCharacter = base.mygame.Content.Load<Texture2D>("Image/figurante"); positionDialogBox = new Vector2(120, 370); imageDialogBox = base.mygame.Content.Load<Texture2D>("Image/DialogBox2"); }
public Button(GameCore mygame, Texture2D baseImg, Texture2D text, Texture2D selection, int nsprites, Vector3 position, Script script, float scale) : base(mygame, null) { this.baseImg = baseImg; this.text = text; this.nsprites = nsprites; this.selection = selection; this.wsprites = baseImg.Width / nsprites; this.myposition = new Rectangle((int)position.X , (int)position.Y, (int)(scale * text.Width), (int)(scale * text.Height)); this.sourceRectangle = new Rectangle(0, 0, wsprites, baseImg.Height); this.script = script; /* System.Console.WriteLine("LETRAS"); System.Console.WriteLine("A " + ((int)'a')); System.Console.WriteLine("B " + ((int)'b')); System.Console.WriteLine("Z " + ((int)'z')); System.Console.WriteLine("0 " + ((int)'0')); System.Console.WriteLine("1 " + ((int)'1')); System.Console.WriteLine("9 " + ((int)'9'));*/ }
private static IGameController MakeController(GameType type, GameCore core, EventFactory eventFactory) { IGameController controller; var baseController = new GameController(core, eventFactory); switch (type) { case GameType.Local: controller = baseController; break; case GameType.Streaming: controller = new ServerController(baseController); break; case GameType.Watching: controller = new ClientController(baseController); break; default: throw new ArgumentOutOfRangeException("GameType"); } return controller; }
public ScreenGameOver(GameCore gamecore) : base(gamecore) { int width = wwidth = gamecore.Window.ClientBounds.Right - gamecore.Window.ClientBounds.Left; int height = wheight = gamecore.Window.ClientBounds.Bottom - gamecore.Window.ClientBounds.Top; for (int i = 0; i < 50; i++) { Sprite nave = new Sprite(mygame, mygame.Content.Load<Texture2D>("mosca2"), 3, new Vector3(rnd.Next(wwidth), -rnd.Next(600), 0), (float)((rnd.NextDouble() + 1) / 2)); addComponent(nave); navesInimigas1.Add(nave); } for (int i = 0; i < 25; i++) { Sprite nave = new Sprite(mygame, mygame.Content.Load<Texture2D>("dualgun"), 4, new Vector3(rnd.Next(wwidth), -rnd.Next(600), 0), (float)((rnd.NextDouble() + 1) / 2)); addComponent(nave); navesInimigas2.Add(nave); } for (int i = 0; i < 10; i++) { Sprite nave = new Sprite(mygame, mygame.Content.Load<Texture2D>("metralhadoraST"), 4, new Vector3(rnd.Next(wwidth), -rnd.Next(600), 0), (float)((rnd.NextDouble() + 1) / 2 + 0.5f)); addComponent(nave); navesInimigas3.Add(nave); } for (int i = 0; i < 5; i++) { Sprite nave = new Sprite(mygame, mygame.Content.Load<Texture2D>("lancadorDeMisseisST"), 4, new Vector3(rnd.Next(wwidth), -rnd.Next(600), 0), (float)((rnd.NextDouble() + 1) )); addComponent(nave); navesInimigas4.Add(nave); } bg = mygame.Content.Load<Texture2D>("bg"); title = mygame.Content.Load<Texture2D>("labelGameOver"); titlepos = new Vector2((width - title.Width) / 2, height+100); while (width > 0) { width -= 200; int htemp = height; while (htemp > -200) { htemp -= 200; bgpos.Add(new Vector2(width, htemp)); } } szbg = bgpos.Count; mygame.sons.playSong(1); }
public ScreenTitle(GameCore gamecore, Vector2 animacao) : base(gamecore) { this.animacao = animacao; int width = wwidth = gamecore.Window.ClientBounds.Right - gamecore.Window.ClientBounds.Left; int height = wheight = gamecore.Window.ClientBounds.Bottom - gamecore.Window.ClientBounds.Top; bt1 = new Button(gamecore, mygame.Content.Load<Texture2D>("Button"), mygame.Content.Load<Texture2D>("labelStart"), mygame.Content.Load<Texture2D>("ButtonS2"), 23, new Vector3(width / 3 - 150, height * 15 / 20, 0),new ScriptBt1(mygame),1.4f); bt2 = new Button(gamecore, mygame.Content.Load<Texture2D>("Button"), mygame.Content.Load<Texture2D>("labelEject"), mygame.Content.Load<Texture2D>("ButtonS2"), 23, new Vector3(width * 2 / 3 + 50, height * 17 / 20, 0), new ScriptBt2(mygame), 1.4f); bt3 = new Button(gamecore, mygame.Content.Load<Texture2D>("Button"), mygame.Content.Load<Texture2D>("labelRecords"), mygame.Content.Load<Texture2D>("ButtonS2"), 23, new Vector3((width/2 - 50), height * 16 / 20, 0), new ScriptBt3(mygame,ref animacao), 1.4f); for (int i = 0; i < 3; i++) { Sprite nave = new Sprite(mygame, mygame.Content.Load<Texture2D>("naveP"), 4, new Vector3(rnd.Next(wwidth), height + height + rnd.Next(600 + height), 0), (float)((rnd.NextDouble() + 1) / 2)); addComponent(nave); naves.Add(nave); } for (int i = 0; i < 30; i++) { Sprite nave = new Sprite(mygame, mygame.Content.Load<Texture2D>("mosca2"), 3, new Vector3(rnd.Next(wwidth), -rnd.Next(600), 0), (float)((rnd.NextDouble() + 1) / 2)); addComponent(nave); navesInimigas.Add(nave); } addComponent(bt1); addComponent(bt2); addComponent(bt3); bt1.setSelected(true); bg = mygame.Content.Load<Texture2D>("bg"); title = mygame.Content.Load<Texture2D>("labelTitle"); titlepos = new Vector2((width - title.Width) / 2, height / 5); while (width > 0) { width -= 200; int htemp = height; while (htemp > -200) { htemp -= 200; bgpos.Add(new Vector2(width, htemp)); } } szbg = bgpos.Count; mygame.sons.playSong(1); }
public ScreenSplash(GameCore gamecore) : base(gamecore) { SaveGame.getInstance().CallLoad(); int width = this.width = gamecore.Window.ClientBounds.Right - gamecore.Window.ClientBounds.Left; int height = this.height = gamecore.Window.ClientBounds.Bottom - gamecore.Window.ClientBounds.Top; for (int i = 0; i < 30;i++ ) { Sprite nave = new Sprite(mygame, mygame.Content.Load<Texture2D>("naveP"), 4, new Vector3(rnd.Next(600), rnd.Next(600), 0), (float)((rnd.NextDouble() + 1)/2)); addComponent(nave); naves.Add(nave); } bg = mygame.Content.Load<Texture2D>("bg"); while (width > 0) { width -= 200; int htemp = height; while (htemp > -200) { htemp -= 200; bgpos.Add(new Vector2(width, htemp)); } } szbg = bgpos.Count; mygame.sons.playSong(0); }
public ScreenRecords(GameCore game, Vector2 animacao) : base(game) { this.animacao = animacao; bg = mygame.Content.Load<Texture2D>("bg"); int width = game.Window.ClientBounds.Right - game.Window.ClientBounds.Left; int height = game.Window.ClientBounds.Bottom - game.Window.ClientBounds.Top; Texture2D img = mygame.Content.Load<Texture2D>("labelRecordsTitle"); recordsSprite = new Sprite(mygame, img, 1, new Vector3(width / 2 - img.Width / 2, 20, 0), 1); while (width > 0) { width -= 200; int htemp = height; while (htemp > -200) { htemp -= 200; bgpos.Add(new Vector2(width, htemp)); } } szbg = bgpos.Count; while (SaveGame.getInstance().GameLoadRequested) { Console.WriteLine("waiting....."); SaveGame.getInstance().Update(); } int y = 150; SaveGame.SavePlayer save = SaveGame.getInstance().player; if (save.score == null) { Console.WriteLine("sem registro"); } else { for (int i = 0; i < 10; i++) { SaveGame.SavePlayerBean bean = save.score[i]; Label lb = new Label(Player.completer((i + 1) + "", 2, "0") + " " + bean.date + " " + bean.name + " " + Player.completer(bean.score + "", 7, "0"), new Vector3(i * -20, y, 0), mygame); lb.interChar = 0; ranks.Add(lb); y += 30; } } }
public RepositorioDeTexturas(GameCore game) { }
public override void InitEvents() { base.InitEvents(); GameCore.RegisterEvent(EVENT_TYPE.EVENT_TIMER_REGISTER_FIRST_LOGIN, RegisterFirstLogin); }
public ScriptBt3(GameCore g, ref Vector2 animacao) { this.g = g; this.animacao = animacao; }
public new CirclePhysics InitModel() { _additionShrinkDisplacement = GameCore.GetModel <SettingsModel>().GameSettings.AdditionShrinkDisplacement; base.InitModel(); return(this); }
public static void showIdleProfits(double rp, double money) { panel.SetActive(true); IdleProfits.rp.text = GameCore.formatSize(rp); IdleProfits.money.text = GameCore.formatSize(money); }
static void Main(string[] args) { #region Forge Installer /* * var forgeInstaller = new ModernForgeInstaller * (new CoreLocator(System.Console.ReadLine()), "1.17.1", "1.17.1", System.Console.ReadLine(), System.Console.ReadLine()); * * var result = forgeInstaller.InstallAsync().GetAwaiter().GetResult(); * System.Console.ReadLine(); * return; */ #endregion #region Vanllia Installer //var install = new VanlliaInstaller(new CoreLocator(System.Console.ReadLine())); //string version = System.Console.ReadLine(); //install.InstallAsync(version).Wait(); //System.Console.WriteLine($"Install Version:{version} Successfully"); //System.Console.ReadLine(); //return; #endregion HttpHelper.SetTimeout(60000); System.Console.Write("Minecraft Path:"); CoreLocator coreLocator = new CoreLocator(System.Console.ReadLine()); System.Console.Write("Java Path:"); string javaPath = System.Console.ReadLine(); System.Console.Write("Version:"); string id = System.Console.ReadLine(); GameCore core = coreLocator.GetGameCoreFromId(id); #region Authlib-Injector /* * System.Console.WriteLine("Loading AuthlibInjector..."); * var injector = new AuthlibInjector("https://skin.greenspray.cn/api/yggdrasil", "C:\\Users\\Admin\\AppData\\Roaming\\.hmcl\\authlib-injector.jar"); * var vs = await injector.GetArgumentsAsync(); */ #endregion System.Console.WriteLine("Loading Authenticator..."); #region YggdrasilAuthenticator /* * * System.Console.Write("Email:"); * string email = System.Console.ReadLine(); * System.Console.Write("Password:"); * string password = System.Console.ReadLine(); * * using var auth = new YggdrasilAuthenticator(email, password); * var res = (YggdrasilResponseModel)auth.AuthenticateAsync().GetAwaiter().GetResult().Item1; * */ #endregion var auth = new MicrosoftAuthenticator(default, client_id, redirect_uri);
void Start() { _drag = true; _core = Camera.main.GetComponent <GameCore>(); }
public GameService(GameCore core) { _core = core; }
//private void StartBuildShip() //{ // (Sys.UISys.Ins.OpenUI("buildShipPanel") as BuildShipPanel).OnBuildShipComplete += BuildShipClosed; //} //private void BuildShipClosed(BuildShipPanel b) //{ // Sys.Stable.Save.playerShipParam = b.buildResult; // Sys.Stable.Save.Save(); // Sys.Stable.Ins.LoadSceneAsync("LevelScene"); //} public void GoBack() { GameCore.LoadSceneAsync("StartScene"); }
public Screen(GameCore game) : base(game, null) { //((ProjectSteelChampions)game).setScreen(novaJanela); <- como se troca de janela }
public EventFactory(GameCore core) { _core = core; }
//Test Me public int GetRatingForTile(GameCore gameCore, Tile tile, Object player) { int rating = 0; //First check if placing a tile here will force the opponent to block us, or give the //opponent a wining move. We shouldn't consider those tiles. var copy = gameCore.Copy(); copy.DropTokenOnColumn(tile.ColumnNo); var otherPlayerDirectWinnable = AIHelper.FindDirectWinningPossibilities(copy.Board, gameCore.GetOtherPlayer(player)); if (otherPlayerDirectWinnable.Count > 0) { //lower skilled players can miss an opponents winning move, especially if they are //focused on their own win if (_difficulty == AIDifficulty.VeryEasy) { rating -= 2; } else if (_difficulty == AIDifficulty.Easy) { rating -= 4; } else if (_difficulty == AIDifficulty.Medium) { rating -= 6; } else { //the other player can win if we play here, so don't play return(-1000); } } var usDirectWinnable = AIHelper.FindDirectWinningPossibilities(copy.Board, player); if (usDirectWinnable.Count > 0) { //we can win next turn if we place here, forcing the other player to make a blocking move. //It may be worth making the move anyway if it gives us a good position, and there isn't //anything better, so don't completley discount it. if (CanCreateCompulsion(copy.Board)) { rating -= 3; } else { //if the player can't create compulsions we shouldn't penalize them for //trying to win if (_difficulty < AIDifficulty.Medium) { //lower skilled players will chase a win rating += 2; } } } //We are trying to create general opportunities to head into the end game by creating //potential token connections. So we want to look at where we have potential connections //and try to build that area up to generate a compulsion. rating += (FindTilesInConnection(gameCore, tile, player).Count * 2); //Future ToDos //Now check the opponents tile connections. Add points based on how many they have, sine we're //blocking their position if (_tryToBlockOpponentsGoodConnections) { rating += FindTilesInConnection(gameCore, tile, gameCore.GetOtherPlayer(player)).Count; } //Check what will happen once we play our tile. Does it open up any good positions? //Do some planning stuff now: //If placing a tile here will start a compulsion for us, add points //If placing a tile here will block an opponents compulsion then add some points. //Check the tile connections for the tile above this one. If the opponent would have good //connections then subtract points. If we would have a good connections subtract points //(since it alows the opponent to block us. return(rating); }
public EndGameEvent(int id, GameCore core) : base(id, GameEventType.EndGame, core) { }
public static void Refresh() { Hashtable hash = new Hashtable(); GameCore.PushEvent(EVENT_TYPE.EVENT_UI_MISSION_REFRESH, hash); }
private void SetGameInternal(GameType type, bool hasEnvironment) { var TextureContainer = new TextureContainer (); var BallFactory = new BallFactory (TextureContainer); var BallManager = new BallManager (BallFactory); var GameCore = new GameCore (BallManager); var EventFactory = new EventFactory (GameCore); var GameController = MakeController (type, GameCore, EventFactory); var Environment = new Environment (GameController, EventFactory); _container = new GameContainer (GameCore, GameController, Environment, hasEnvironment); HasErrors = false; Initialized = true; }
public DraftCardViewModel(GameCore core) : base(core) { }
private void Awake() { _t = GetComponent <Transform>(); _gameCore = GameObject.Find("Game").GetComponent <GameCore>(); }
protected virtual void Start() { GameCore.GetSystem <TimersManager>().AddTimers(this, Timers); }
internal static void RunGame() { game = new GameCore(); game.Run(); }
bool alreadyRotating = false; //If any diamond is rotating #endregion void Start() { gameCore = GetComponent <GameCore>(); }
private void Awake() { _core = Camera.main.GetComponent <GameCore>(); }
public SlotController(GameCore core) { mSlotMono = GameObject.Find("Slot").GetComponent<SlotMono>(); mSlotMono.SetController(this); mCore = core; }
public ScriptBt2(GameCore g) { this.g = g; }
protected override bool Perform(GameCore <Player> game, out Point newPosition) { // Do nothing. newPosition = CurrentGame.PlayerPosition; return(true); }
public ParticleEngine(GameCore game) { Game = game; _particles = new Particle[Game.Settings.ParticleLimit]; }
public ClickBallEvent(int id, GameCore core, int ballId) : base(id, GameEventType.ClickBall, core) { _ballId = ballId; }
public ManagerViewModel(GameCore core) : base(core) { }
IEnumerator Start() { m_Transform = this.transform; m_GameObject = this.gameObject; yield return(null); mapController = GameCore.GetRegistServices <MapController>(); currentCell = mapController.GetRandomCell().Point; var mapSize = mapController.GetMapSize(); //this.transform.position = HexCoords.GetHexVisualCoords(currentCell, mapSize); this.transform.position = Coords.PointToVisualPosition(currentCell); //设定职业 applyZhiye(); player_LogicSwitchA = playerUpdate(); playerAndAI_LogicSwitchB = actionRemote.AutoUpdate(); //设定模型外观 int index = GameEntityMgr.Instance.GetAllEntities().IndexOf(this); entityVisual = new GameEntityVisual(this.transform.Find("Model").gameObject, ModelID, index); if (controllType == EntityType.Player) { PlayerEntitiyControll player = new PlayerEntitiyControll(); player.SetEntityID(entityID); controllRemote = player; runtimeData = controllRemote.GetOrUpdateRuntimeData(this); runtimeSwitcher = player_LogicSwitchA; //StartCoroutine(updateContainer()); //Observable.FromCoroutine(updateContainer).Subscribe(); //MainThreadDispatcher.StartCoroutine(updateContainer()); } else if (controllType == EntityType.AI) { entityVisual.ChangeHPColor(Color.cyan); AIEntitiyControll ai = new AIEntitiyControll(); ai.SetEntityID(entityID); controllRemote = ai; runtimeData = controllRemote.GetOrUpdateRuntimeData(this); runtimeSwitcher = playerAndAI_LogicSwitchB; //StartCoroutine(updateContainer()); //Observable.FromCoroutine(updateContainer).Subscribe(); //MainThreadDispatcher.StartCoroutine(updateContainer()); } else if (controllType == EntityType.PlayerSummon) { entityVisual.ChangeHPColor(Color.yellow); AIEntitiyControll ai = new AIEntitiyControll(); ai.SetEntityID(entityID); controllRemote = ai; runtimeData = controllRemote.GetOrUpdateRuntimeData(this); runtimeSwitcher = playerAndAI_LogicSwitchB; //StartCoroutine(updateContainer()); //Observable.FromCoroutine(updateContainer).Subscribe(); } GameTimer.AwaitLoopSecondsBaseOnCore(1, controllRemote.CalledEverySeconds); calculateRangeOnEnterPoint(); initUniRxPrograming(); //if (controllType == EntityControllType.AI) //{ // onReachDst += async () => // { // await new WaitForSeconds(1); // randomMove(); // }; // randomMove(); //} }
public Wall(GameCore game, bool authorized, Vector2 position = default(Vector2), float rotation = 0) : base(game, authorized, position, rotation) { }
public override UnitModel InitModel() { base.InitModel(); Width = Height = GameCore.GetModel <SettingsModel>().Settings.UnitSettings.Radius * 2; return(this); }
// Called when the node enters the scene tree for the first time. public override void _Ready() { GameCore core = new GameCore(); }
void Start() { _core = Camera.main.GetComponent <GameCore>(); }
public NullRenderer(GameCore game) { _game = game; }
public void LoadContent(GameCore game) { Mono10 = game.Content.Load <SpriteFont>("FreeMono_10"); levelFont = game.Content.Load <SpriteFont>("TitleFont"); }
private void Awake() { Instance = this; }