add in keyword to Spawn
continuous-integration/drone/push Build is passing Details

main
Evan Hemsley 2020-07-21 18:28:40 -07:00
parent 103211c440
commit f9db7f18e4
8 changed files with 11 additions and 11 deletions

View File

@ -41,7 +41,7 @@ namespace PongFE.Spawners
{
public class BoundarySpawner : Spawner<BoundarySpawnMessage>
{
protected override void Spawn(BoundarySpawnMessage message)
protected override void Spawn(in BoundarySpawnMessage message)
{
var entity = CreateEntity();

View File

@ -127,7 +127,7 @@ namespace PongFE.Spawners
BallTexture = ballTexture;
}
protected override void Spawn(BallSpawnMessage message)
protected override void Spawn(in BallSpawnMessage message)
{
var ball = CreateEntity();
AddComponent(ball, new PositionComponent(message.Position));

View File

@ -169,7 +169,7 @@ namespace PongFE.Spawners
PaddleTexture = paddleTexture;
}
protected override void Spawn(PaddleSpawnMessage message)
protected override void Spawn(in PaddleSpawnMessage message)
{
var paddle = CreateEntity();
AddComponent(paddle, new Texture2DComponent(PaddleTexture, 0));
@ -245,7 +245,7 @@ namespace PongFE.Spawners
WhitePixel = whitePixel;
}
protected override void Spawn(PaddleSpawnMessage message)
protected override void Spawn(in PaddleSpawnMessage message)
{
var paddle = CreateEntity();
AddComponent(paddle, new PlayerInputComponent(message.PlayerIndex));
@ -324,7 +324,7 @@ namespace PongFE.Spawners
WhitePixel = whitePixel;
}
protected override void Spawn(BallSpawnMessage message)
protected override void Spawn(in BallSpawnMessage message)
{
var ball = CreateEntity();
AddComponent(ball, new PositionComponent(message.Position));

View File

@ -75,7 +75,7 @@ namespace PongFE.Spawners
BallTexture = ballTexture;
}
protected override void Spawn(BallSpawnMessage message)
protected override void Spawn(in BallSpawnMessage message)
{
var ball = CreateEntity();
SetComponent(ball, new PositionComponent(new MoonTools.Structs.Position2D(640, 360)));
@ -136,7 +136,7 @@ namespace PongFE.Spawners
BallTexture = ballTexture;
}
protected override void Spawn(BallSpawnMessage message)
protected override void Spawn(in BallSpawnMessage message)
{
var ball = CreateEntity();
AddComponent(ball, new PositionComponent(new MoonTools.Structs.Position2D(640, 360)));

View File

@ -68,7 +68,7 @@ namespace PongFE.Spawners
{
public class UITextSpawner : Spawner<UITextSpawnMessage>
{
protected override void Spawn(UITextSpawnMessage message)
protected override void Spawn(in UITextSpawnMessage message)
{
var entity = CreateEntity();

View File

@ -83,7 +83,7 @@ namespace PongFE.Spawners
{
public class GoalBoundarySpawner : Spawner<GoalBoundarySpawnMessage>
{
protected override void Spawn(GoalBoundarySpawnMessage message)
protected override void Spawn(in GoalBoundarySpawnMessage message)
{
var entity = CreateEntity();

View File

@ -172,7 +172,7 @@ namespace PongFE.Spawners
{
public class GoalBoundarySpawner : Spawner<GoalBoundarySpawnMessage>
{
protected override void Spawn(GoalBoundarySpawnMessage message)
protected override void Spawn(in GoalBoundarySpawnMessage message)
{
var entity = CreateEntity();

View File

@ -252,7 +252,7 @@ namespace PongFE.Spawners
WhitePixel = whitePixel;
}
protected override void Spawn(PaddleSpawnMessage message)
protected override void Spawn(in PaddleSpawnMessage message)
{
var paddle = CreateEntity();
if (message.PaddleControl == PaddleControl.Player)