diff --git a/Engine b/Engine index d75bae8..12bbfdc 160000 --- a/Engine +++ b/Engine @@ -1 +1 @@ -Subproject commit d75bae802abfd044457d3bd9cfc6d9e5faad4656 +Subproject commit 12bbfdceaf278809b976a34da9d4415327081152 diff --git a/Game/Game.csproj b/Game/Game.csproj index ada7328..4117ad7 100644 --- a/Game/Game.csproj +++ b/Game/Game.csproj @@ -25,6 +25,7 @@ + diff --git a/Game/Game1.cs b/Game/Game1.cs index e7ad6d7..da288d2 100644 --- a/Game/Game1.cs +++ b/Game/Game1.cs @@ -5,7 +5,7 @@ using Microsoft.Xna.Framework.Input; using Pong.Behaviours; using Syntriax.Engine.Core; using Syntriax.Engine.Core.Abstract; -using Syntriax.Engine.Core.Behaviours; +using Syntriax.Engine.Graphics.TwoDimensional; using Syntriax.Engine.Input; namespace Pong; @@ -40,8 +40,7 @@ public class Game1 : Game _spriteBatch = new SpriteBatch(GraphicsDevice); Texture2D texture2D = Content.Load("Sprites/Pixel"); - Sprite spriteRight = new Sprite() { Texture2D = texture2D, Color = Color.Gold }; - Sprite spriteLeft = new Sprite() { Texture2D = texture2D, Color = Color.AliceBlue }; + Sprite sprite = new Sprite() { Texture2D = texture2D }; gameObjectLeft = gameManager.InstantiateGameObject(); gameObjectLeft.Name = "Left"; @@ -49,7 +48,7 @@ public class Game1 : Game gameObjectLeft.Transform.Scale = new Vector2(Window.ClientBounds.Width * .02f, Window.ClientBounds.Height * .15f); gameObjectLeft.BehaviourController.AddBehaviour(); gameObjectLeft.BehaviourController.AddBehaviour(Keys.S, Keys.W, 200f); - gameObjectLeft.BehaviourController.AddBehaviour().Assign(spriteLeft); + gameObjectLeft.BehaviourController.AddBehaviour(Color.Gold, null, null, null).Assign(sprite); gameObjectRight = gameManager.InstantiateGameObject(); gameObjectRight.Name = "Right"; @@ -57,7 +56,7 @@ public class Game1 : Game gameObjectRight.Transform.Scale = new Vector2(Window.ClientBounds.Width * .02f, Window.ClientBounds.Height * .15f); gameObjectRight.BehaviourController.AddBehaviour(); gameObjectRight.BehaviourController.AddBehaviour(Keys.Down, Keys.Up, 200f); - gameObjectRight.BehaviourController.AddBehaviour().Assign(spriteRight); + gameObjectRight.BehaviourController.AddBehaviour(Color.AliceBlue, null, null, null).Assign(sprite); // TODO: use this.Content to load your game content here } diff --git a/Pong.sln b/Pong.sln index bd3a9e4..d951ade 100644 --- a/Pong.sln +++ b/Pong.sln @@ -9,6 +9,10 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Engine.Core", "Engine\Engin EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Game", "Game\Game.csproj", "{500E1B05-39D7-4232-8051-E7351D745306}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Engine.Input", "Engine\Engine.Input\Engine.Input.csproj", "{7EED4EC3-79D5-4C6C-A54D-1B396213C0E4}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Engine.Graphics", "Engine\Engine.Graphics\Engine.Graphics.csproj", "{7371D9AF-6F4D-4F05-8458-197C4EE66B01}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -26,8 +30,18 @@ Global {500E1B05-39D7-4232-8051-E7351D745306}.Debug|Any CPU.Build.0 = Debug|Any CPU {500E1B05-39D7-4232-8051-E7351D745306}.Release|Any CPU.ActiveCfg = Release|Any CPU {500E1B05-39D7-4232-8051-E7351D745306}.Release|Any CPU.Build.0 = Release|Any CPU + {7EED4EC3-79D5-4C6C-A54D-1B396213C0E4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {7EED4EC3-79D5-4C6C-A54D-1B396213C0E4}.Debug|Any CPU.Build.0 = Debug|Any CPU + {7EED4EC3-79D5-4C6C-A54D-1B396213C0E4}.Release|Any CPU.ActiveCfg = Release|Any CPU + {7EED4EC3-79D5-4C6C-A54D-1B396213C0E4}.Release|Any CPU.Build.0 = Release|Any CPU + {7371D9AF-6F4D-4F05-8458-197C4EE66B01}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {7371D9AF-6F4D-4F05-8458-197C4EE66B01}.Debug|Any CPU.Build.0 = Debug|Any CPU + {7371D9AF-6F4D-4F05-8458-197C4EE66B01}.Release|Any CPU.ActiveCfg = Release|Any CPU + {7371D9AF-6F4D-4F05-8458-197C4EE66B01}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(NestedProjects) = preSolution {990CA10C-1EBB-4395-A43A-456B7029D8C9} = {F7F62670-237A-4C93-A30E-CE661C6FC401} + {7EED4EC3-79D5-4C6C-A54D-1B396213C0E4} = {F7F62670-237A-4C93-A30E-CE661C6FC401} + {7371D9AF-6F4D-4F05-8458-197C4EE66B01} = {F7F62670-237A-4C93-A30E-CE661C6FC401} EndGlobalSection EndGlobal