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 } } }