protected override void OnLoad() { GL.Enable(EnableCap.Blend); GL.BlendFunc(BlendingFactor.SrcAlpha, BlendingFactor.OneMinusSrcAlpha); GL.PolygonMode(MaterialFace.FrontAndBack, PolygonMode.Fill); GL.ClearColor(0.2f, 0.3f, 0.3f, 1.0f); spritedrawer = new SpriteDrawer(view); hud = new HUD(this); CursorVisible = true; Input.Initialize(this); mousePos = this.MousePosition; Input.mousePosition = mousePos; texture = SpriteDrawer.LoadTexture("PNG\\playerShip1_red.png", false, false); player = new PlayerShip(0, 0, 0, texture, SpriteDrawer.LoadTexture("PNG\\Lasers\\laserBlue01.png", true, false), view); hud.connectLifeToUI(player.GetPlayerStats()); enemyAI = new AI(spaceObjects, player); Ship enemy1 = new Ship(200, 200, 0, SpriteDrawer.LoadTexture("PNG\\ufoBlue.png", false, false)); player.setTarget(enemy1); enemyAI.takeControl(enemy1); spaceObjects.Add(enemy1); base.OnLoad(); }
public AI(List <SpaceObject> world, PlayerShip player) { this.world = world; this.player = player; minions = new List <Ship>(); }