1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 | using System; using System.Collections.Generic; using System.Linq; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Audio; using Microsoft.Xna.Framework.Content; using Microsoft.Xna.Framework.GamerServices; using Microsoft.Xna.Framework.Graphics; using Microsoft.Xna.Framework.Input; using Microsoft.Xna.Framework.Media; namespace XNASnake { class Snake { public Snake(Texture2D t) { texture = t; velocity = new Vector2(0, 0); position = new Vector2(400, 300); } public Texture2D texture; public Vector2 velocity; public Vector2 position; public Vector2 pozycjaPoprzednia; public Rectangle Rectanglee() { return new Rectangle(Convert.ToInt32(position.X), Convert.ToInt32(position.Y), texture.Width, texture.Height); } public enum WhereToGo { goLEFT, goRIGHT, goUP, goDOWN } } } |
dXNpbmcgU3lzdGVtOwp1c2luZyBTeXN0ZW0uQ29sbGVjdGlvbnMuR2VuZXJpYzsKdXNpbmcgU3lzdGVtLkxpbnE7CnVzaW5nIE1pY3Jvc29mdC5YbmEuRnJhbWV3b3JrOwp1c2luZyBNaWNyb3NvZnQuWG5hLkZyYW1ld29yay5BdWRpbzsKdXNpbmcgTWljcm9zb2Z0LlhuYS5GcmFtZXdvcmsuQ29udGVudDsKdXNpbmcgTWljcm9zb2Z0LlhuYS5GcmFtZXdvcmsuR2FtZXJTZXJ2aWNlczsKdXNpbmcgTWljcm9zb2Z0LlhuYS5GcmFtZXdvcmsuR3JhcGhpY3M7CnVzaW5nIE1pY3Jvc29mdC5YbmEuRnJhbWV3b3JrLklucHV0Owp1c2luZyBNaWNyb3NvZnQuWG5hLkZyYW1ld29yay5NZWRpYTsKCm5hbWVzcGFjZSBYTkFTbmFrZQp7CiAgICBjbGFzcyBTbmFrZQogICAgewogICAgICAgIHB1YmxpYyBTbmFrZShUZXh0dXJlMkQgdCkKICAgICAgICB7CiAgICAgICAgICAgIHRleHR1cmUgPSB0OwogICAgICAgICAgICB2ZWxvY2l0eSA9IG5ldyBWZWN0b3IyKDAsIDApOwogICAgICAgICAgICBwb3NpdGlvbiA9IG5ldyBWZWN0b3IyKDQwMCwgMzAwKTsKICAgICAgICB9CiAgICAgICAgcHVibGljIFRleHR1cmUyRCB0ZXh0dXJlOwogICAgICAgIHB1YmxpYyBWZWN0b3IyIHZlbG9jaXR5OwogICAgICAgIHB1YmxpYyBWZWN0b3IyIHBvc2l0aW9uOwogICAgICAgIHB1YmxpYyBWZWN0b3IyIHBvenljamFQb3ByemVkbmlhOwoKCiAgICAgICAgcHVibGljIFJlY3RhbmdsZSBSZWN0YW5nbGVlKCkKICAgICAgICB7CiAgICAgICAgICAgIHJldHVybiBuZXcgUmVjdGFuZ2xlKENvbnZlcnQuVG9JbnQzMihwb3NpdGlvbi5YKSwgQ29udmVydC5Ub0ludDMyKHBvc2l0aW9uLlkpLCB0ZXh0dXJlLldpZHRoLCB0ZXh0dXJlLkhlaWdodCk7CiAgICAgICAgfQoKICAgICAgICBwdWJsaWMgZW51bSBXaGVyZVRvR28KICAgICAgICB7CiAgICAgICAgICAgIGdvTEVGVCwKICAgICAgICAgICAgZ29SSUdIVCwKICAgICAgICAgICAgZ29VUCwKICAgICAgICAgICAgZ29ET1dOCiAgICAgICAgfQogICAgfQp9Cg==
prog.cs(4,17): error CS0234: The type or namespace name `Xna' does not exist in the namespace `Microsoft'. Are you missing an assembly reference? prog.cs(5,17): error CS0234: The type or namespace name `Xna' does not exist in the namespace `Microsoft'. Are you missing an assembly reference? prog.cs(6,17): error CS0234: The type or namespace name `Xna' does not exist in the namespace `Microsoft'. Are you missing an assembly reference? prog.cs(7,17): error CS0234: The type or namespace name `Xna' does not exist in the namespace `Microsoft'. Are you missing an assembly reference? prog.cs(8,17): error CS0234: The type or namespace name `Xna' does not exist in the namespace `Microsoft'. Are you missing an assembly reference? prog.cs(9,17): error CS0234: The type or namespace name `Xna' does not exist in the namespace `Microsoft'. Are you missing an assembly reference? prog.cs(10,17): error CS0234: The type or namespace name `Xna' does not exist in the namespace `Microsoft'. Are you missing an assembly reference? prog.cs(23,16): error CS0246: The type or namespace name `Vector2' could not be found. Are you missing a using directive or an assembly reference? prog.cs(24,16): error CS0246: The type or namespace name `Vector2' could not be found. Are you missing a using directive or an assembly reference? prog.cs(25,16): error CS0246: The type or namespace name `Vector2' could not be found. Are you missing a using directive or an assembly reference? prog.cs(16,22): error CS0246: The type or namespace name `Texture2D' could not be found. Are you missing a using directive or an assembly reference? prog.cs(28,16): error CS0246: The type or namespace name `Rectangle' could not be found. Are you missing a using directive or an assembly reference? prog.cs(4,17): error CS0234: The type or namespace name `Xna' does not exist in the namespace `Microsoft'. Are you missing an assembly reference? prog.cs(5,17): error CS0234: The type or namespace name `Xna' does not exist in the namespace `Microsoft'. Are you missing an assembly reference? prog.cs(6,17): error CS0234: The type or namespace name `Xna' does not exist in the namespace `Microsoft'. Are you missing an assembly reference? prog.cs(7,17): error CS0234: The type or namespace name `Xna' does not exist in the namespace `Microsoft'. Are you missing an assembly reference? prog.cs(8,17): error CS0234: The type or namespace name `Xna' does not exist in the namespace `Microsoft'. Are you missing an assembly reference? prog.cs(9,17): error CS0234: The type or namespace name `Xna' does not exist in the namespace `Microsoft'. Are you missing an assembly reference? prog.cs(10,17): error CS0234: The type or namespace name `Xna' does not exist in the namespace `Microsoft'. Are you missing an assembly reference? Compilation failed: 19 error(s), 0 warnings
-
result: Compilation error (maybe you wish to see an example for C#)


