Exemple #1
0
 public CityLevel():base()
 {
     city = new Texture("../../Assets/City.png");
     cityMesh = new Sprite(city.Width, city.Height);
 }
 public SpriteObject(int width, int height, bool automaticHitBox = false, string automaticHitBoxName = "auto")
 {
     Sprite = new Sprite(width, height);
     AutomaticHitBox = automaticHitBox;
     AutomaticHitBoxName = automaticHitBoxName;
 }
Exemple #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;
        }