コード例 #1
0
ファイル: World.cs プロジェクト: nagysa1313/Cannonball
 // TODO: asset ids instead of SpriteFont and Model references
 public int SpawnPlayer(string name)
 {
     var player = Spawn();
     Transformations[player] = new Transformation();
     Primitives[player] = new Primitive() { Geometry = Cannonball.Engine.Procedural.Objects.Primitives.Cube };
     Players[player] = new Player() { Name = name, Font = Game.Content.Load<SpriteFont>("Fonts/DebugFont") };
     PlayerControls[player] = new PlayerControl() { Controllable = true };
     return player;
 }
コード例 #2
0
ファイル: World.cs プロジェクト: nagysa1313/Cannonball
 public int SpawnEnemy()
 {
     var enemy = Spawn();
     Transformations[enemy] = new Transformation();
     Primitives[enemy] = new Primitive() { Geometry = Cannonball.Engine.Procedural.Objects.Primitives.Cube };
     return enemy;
 }