public override void Load() { GameManager.LevelBorderSize = new Vector2(250, 250); GameManager.BulletLayer = new Layer(); GameManager.UILayer = new Layer(); GameManager.UILayer.Depth = 0.8f; DamageIndicator.Initialize(GameManager.UILayer); this.Level = new Level(); this.Player = new Player(GameManager.BulletLayer); this.Player.Position = new Vector2(32, 0); this.Director = new Director(this.Player, this.Level, GameManager.BulletLayer); this.AddChild(this.Level); this.AddChild(Player); this.AddChild(GameManager.BulletLayer); this.AddChild(GameManager.UILayer); GameManager.currentDrawCamera.followNode = this.Player; this.SpawnPlayer(); Enemy.Players = new List<Player>(4); Enemy.Players.Add(this.Player); EnemyType enemyType = new EnemyType(); Enemy enemy = enemyType.Pool.New(); enemy.Activate(); enemy.Position = this.Player.Position - new Vector2(64, 64); this.AddChild(enemy); }
public Director(Player player, Level level, Layer bulletLayer) { this.Player = player; this.Level = level; this.BulletLayer = bulletLayer; }