- Timestamp:
- 2013-07-02 14:18:37 (10 years ago)
- Location:
- 2013/27/TeemuM/Game
- Files:
-
- 14 edited
Legend:
- Unmodified
- Added
- Removed
-
2013/27/TeemuM/Game/Game/Game/Game.cs
r4352 r4353 7 7 using Jypeli.Widgets; 8 8 9 public class G ame: PhysicsGame9 public class G : PhysicsGame 10 10 { 11 public static G game; 12 public Image playerImage = LoadImage("Player"); 13 11 14 public override void Begin() 12 15 { 13 Player pelaaja = new Player(50, 50); 16 game = this; 17 18 Player pelaaja = new Player(this, 50, 50); 14 19 Add(pelaaja); 15 20 16 21 PhoneBackButton.Listen(Exit, "Lopeta peli"); 17 22 Keyboard.Listen(Key.Escape, ButtonState.Pressed, Exit, "Lopeta peli"); 23 24 Mouse.IsCursorVisible = true; 25 } 26 27 protected override void Update(Microsoft.Xna.Framework.GameTime gameTime) 28 { 29 30 base.Update(gameTime); 18 31 } 19 32 } -
2013/27/TeemuM/Game/Game/Game/Ohjelma.cs
r4352 r4353 6 6 static void Main(string[] args) 7 7 { 8 using (G ame game = new Game())8 using (G game = new G()) 9 9 { 10 10 #if !DEBUG -
2013/27/TeemuM/Game/Game/Game/Player.cs
r4352 r4353 1 1 using System; 2 2 using System.Collections.Generic; 3 using System.Linq;4 using System.Text;5 3 using Jypeli; 6 4 using Jypeli.Assets; … … 9 7 using Jypeli.Widgets; 10 8 11 public class Player : P latformCharacter9 public class Player : PhysicsObject 12 10 { 13 public Player(double width, double height) : base(width, height) 11 const double defaultMoveSpeed = 1000; 12 double speed = defaultMoveSpeed; 13 14 public Player(Game game, double width, double height) : base(width, height) 15 { 16 this.Shape = Shape.Circle; 17 this.Image = G.game.playerImage; 18 this.LinearDamping = 0.9; 19 20 SetControls(); 21 IsUpdated = true; 22 } 23 24 public void SetControls() 25 { 26 G.game.Keyboard.Listen(Key.W, ButtonState.Down, delegate { this.Push(new Vector(0, speed)); }, null); 27 G.game.Keyboard.Listen(Key.S, ButtonState.Down, delegate { this.Push(new Vector(0, -speed)); }, null); 28 G.game.Keyboard.Listen(Key.A, ButtonState.Down, delegate { this.Push(new Vector(-speed, 0)); }, null); 29 G.game.Keyboard.Listen(Key.D, ButtonState.Down, delegate { this.Push(new Vector(speed, 0)); }, null); 30 G.game.Mouse.Listen(MouseButton.Left, ButtonState.Pressed, Shoot, null); 31 } 32 33 public void Shoot() 14 34 { 15 35 16 36 } 37 38 public override void Update(Time time) 39 { 40 this.Angle = (G.game.Mouse.PositionOnWorld - this.AbsolutePosition).Normalize().Angle - Angle.FromDegrees(90); 41 base.Update(time); 42 } 17 43 } -
2013/27/TeemuM/Game/Game/Game/obj/x86/Debug/ContentPipeline-{7DE21D26-C0FA-4B3B-93A6-C0EF7849F918}.xml
r4352 r4353 2 2 <XnaContent xmlns:Pipeline="Microsoft.Xna.Framework.Content.Pipeline"> 3 3 <Asset Type="Pipeline:BuildItemCollection"> 4 <Item> 5 <Source>Player.png</Source> 6 <Name>Player</Name> 7 <Importer>TextureImporter</Importer> 8 <Processor>TextureProcessor</Processor> 9 <Options>None</Options> 10 <Output>C:\MyTemp\jumakall\TeemuM\Game\Game\Game\bin\x86\Debug\Content\Player.xnb</Output> 11 <Time>2013-07-02T13:02:38.9536571+03:00</Time> 12 </Item> 4 13 <BuildSuccessful>true</BuildSuccessful> 5 14 <Settings> … … 9 18 <BuildConfiguration>Debug</BuildConfiguration> 10 19 <CompressContent>false</CompressContent> 11 <RootDirectory>C:\MyTemp\jumakall\ jumakall\Game\Game\GameContent\</RootDirectory>12 <LoggerRootDirectory>C:\MyTemp\jumakall\ jumakall\Game\Game\Game\</LoggerRootDirectory>13 <IntermediateDirectory>C:\MyTemp\jumakall\ jumakall\Game\Game\Game\obj\x86\Debug\</IntermediateDirectory>14 <OutputDirectory>C:\MyTemp\jumakall\ jumakall\Game\Game\Game\bin\x86\Debug\Content\</OutputDirectory>20 <RootDirectory>C:\MyTemp\jumakall\TeemuM\Game\Game\GameContent\</RootDirectory> 21 <LoggerRootDirectory>C:\MyTemp\jumakall\TeemuM\Game\Game\Game\</LoggerRootDirectory> 22 <IntermediateDirectory>C:\MyTemp\jumakall\TeemuM\Game\Game\Game\obj\x86\Debug\</IntermediateDirectory> 23 <OutputDirectory>C:\MyTemp\jumakall\TeemuM\Game\Game\Game\bin\x86\Debug\Content\</OutputDirectory> 15 24 </Settings> 16 25 <Assemblies> 26 <Assembly> 27 <Key>C:\Program Files (x86)\Jypeli\lib\ContentExtensions\TextFileContentExtension.dll</Key> 28 <Value>2013-06-10T21:54:20+03:00</Value> 29 </Assembly> 30 <Assembly> 31 <Key>C:\Program Files (x86)\Microsoft XNA\XNA Game Studio\v4.0\References\Windows\x86\Microsoft.Xna.Framework.Content.Pipeline.XImporter.dll</Key> 32 <Value>2011-09-01T17:22:30+03:00</Value> 33 </Assembly> 34 <Assembly> 35 <Key>C:\Program Files (x86)\Microsoft XNA\XNA Game Studio\v4.0\References\Windows\x86\Microsoft.Xna.Framework.Content.Pipeline.VideoImporters.dll</Key> 36 <Value>2011-09-01T17:22:30+03:00</Value> 37 </Assembly> 38 <Assembly> 39 <Key>C:\Program Files (x86)\Microsoft XNA\XNA Game Studio\v4.0\References\Windows\x86\Microsoft.Xna.Framework.Content.Pipeline.TextureImporter.dll</Key> 40 <Value>2011-09-01T17:22:30+03:00</Value> 41 </Assembly> 42 <Assembly> 43 <Key>C:\Program Files (x86)\Microsoft XNA\XNA Game Studio\v4.0\References\Windows\x86\Microsoft.Xna.Framework.Content.Pipeline.FBXImporter.dll</Key> 44 <Value>2011-09-01T17:22:30+03:00</Value> 45 </Assembly> 46 <Assembly> 47 <Key>C:\Program Files (x86)\Microsoft XNA\XNA Game Studio\v4.0\References\Windows\x86\Microsoft.Xna.Framework.Content.Pipeline.EffectImporter.dll</Key> 48 <Value>2011-09-01T17:22:30+03:00</Value> 49 </Assembly> 50 <Assembly> 51 <Key>C:\Program Files (x86)\Microsoft XNA\XNA Game Studio\v4.0\References\Windows\x86\Microsoft.Xna.Framework.Content.Pipeline.AudioImporters.dll</Key> 52 <Value>2011-09-01T17:22:30+03:00</Value> 53 </Assembly> 54 <Assembly> 55 <Key>C:\Program Files (x86)\Jypeli\lib\ContentExtensions\AnimationExtension.dll</Key> 56 <Value>2013-06-10T21:54:20+03:00</Value> 57 </Assembly> 17 58 <Assembly> 18 59 <Key>C:\Windows\Microsoft.Net\assembly\GAC_32\Microsoft.Xna.Framework.Content.Pipeline\v4.0_4.0.0.0__842cf8be1de50553\Microsoft.Xna.Framework.Content.Pipeline.dll</Key> -
2013/27/TeemuM/Game/Game/Game/obj/x86/Debug/Game.csproj.FileListAbsolute.txt
r4352 r4353 7 7 C:\MyTemp\jumakall\jumakall\Game\Game\Game\obj\x86\Debug\Game.exe 8 8 C:\MyTemp\jumakall\jumakall\Game\Game\Game\obj\x86\Debug\Game.pdb 9 C:\MyTemp\jumakall\TeemuM\Game\Game\Game\bin\x86\Debug\Game.exe 10 C:\MyTemp\jumakall\TeemuM\Game\Game\Game\bin\x86\Debug\Game.pdb 11 C:\MyTemp\jumakall\TeemuM\Game\Game\Game\bin\x86\Debug\Jypeli.dll 12 C:\MyTemp\jumakall\TeemuM\Game\Game\Game\bin\x86\Debug\Jypeli.xml 13 C:\MyTemp\jumakall\TeemuM\Game\Game\Game\obj\x86\Debug\ResolveAssemblyReference.cache 14 C:\MyTemp\jumakall\TeemuM\Game\Game\Game\obj\x86\Debug\Microsoft.Xna.Framework.RuntimeProfile.txt 15 C:\MyTemp\jumakall\TeemuM\Game\Game\Game\obj\x86\Debug\Game.exe 16 C:\MyTemp\jumakall\TeemuM\Game\Game\Game\obj\x86\Debug\Game.pdb 17 C:\MyTemp\jumakall\TeemuM\Game\Game\Game\bin\x86\Debug\Content\Player.xnb -
2013/27/TeemuM/Game/Game/GameContent/GameContent.contentproj
r4352 r4353 45 45 <Reference Include="AnimationExtension" /> 46 46 </ItemGroup> 47 <ItemGroup> 48 <Compile Include="Player.png"> 49 <Name>Player</Name> 50 <Importer>TextureImporter</Importer> 51 <Processor>TextureProcessor</Processor> 52 </Compile> 53 </ItemGroup> 47 54 <Import Project="$(MSBuildExtensionsPath)\Microsoft\XNA Game Studio\$(XnaFrameworkVersion)\Microsoft.Xna.GameStudio.ContentPipeline.targets" /> 48 55 <!-- To modify your build process, add your task inside one of the targets below and uncomment it. -
2013/27/TeemuM/Game/Game/GameContent/obj/x86/Debug/GameContent.contentproj.FileListAbsolute.txt
r4352 r4353 1 1 C:\MyTemp\jumakall\jumakall\Game\Game\GameContent\obj\x86\Debug\ResolveAssemblyReference.cache 2 C:\MyTemp\jumakall\TeemuM\Game\Game\GameContent\obj\x86\Debug\ResolveAssemblyReference.cache
Note: See TracChangeset
for help on using the changeset viewer.