public void Setup() { player = new Player(); player.width = 50; player.height = 50; thrownObject = new ThrowObject(); thrownObject.width = 50; thrownObject.height = 50; level = new Level(); level.Player = (Player)player; level.ThrownObjects = new List<ThrowObject>(); level.ThrownObjects.Add((ThrowObject)thrownObject); throwAttack = new ThrowAttack(); throwAttack.SetLevel(level); thrownObject.SetLevel(level); player.SetLevel(level); throwingEnemy = new LittleEnemy(); throwingEnemy.SetAttack(throwAttack); }
private void InitializeEnemy(Enemy enemy) { if (enemy is EndBoss) { ((EndBoss)enemy).Initialize(); } else { enemy.Initialize(true); } enemy.SetLevel(this); enemy.SetAttack(); }