Exemplo n.º 1
0
 public CityLevel():base()
 {
     city = new Texture("../../Assets/City.png");
     cityMesh = new Sprite(city.Width, city.Height);
 }
Exemplo n.º 2
0
 public SpriteObject(int width, int height, bool automaticHitBox = false, string automaticHitBoxName = "auto")
 {
     Sprite = new Sprite(width, height);
     AutomaticHitBox = automaticHitBox;
     AutomaticHitBoxName = automaticHitBoxName;
 }
Exemplo n.º 3
0
        protected void Initialize()
        {
            // crappy
            //new AudioSource();

            Camera = new Camera();

            // create dictionaries
            Objects = new Dictionary<string, GameObject>();
            SortedObjects = new SortedSet<GameObject>(new GameObjectComparer());
            Assets = new Dictionary<string, Asset>();

            dirtyObjects = new Dictionary<GameObject, int>();

            Joysticks = new Joystick[8];

            debugCollisionsCuboids = new Dictionary<GameObject.HitBox, Cuboid>();

            Timer = new TimerManager(this);

            WorkingTexture = new Texture(Width, Height);
            WorkingSprite = new Sprite(Width, Height)
            {
                Rotation = (float)Math.PI, 
                pivot = new OpenTK.Vector2(Width / 2f, Height / 2f)
            };
            WorkingSprite.position = WorkingSprite.pivot;
        }