예제 #1
0
파일: Entity.cs 프로젝트: jtrain184/mgp18
        // shortened constructor (used for Entities such as E_Space:
        public Entity(State parentState, Vector2 pos)
        {
            this.parentState  = parentState;
            this.pos          = pos;
            this.id           = EntityCounter.takeNumber();
            this.sprite       = parentState.parentManager.game.noSprite; // default sprite
            this.spriteWidth  = sprite.Width;
            this.spriteHeight = sprite.Height;

            // Default values:
            this.active  = true;
            this.visible = true;
        }
예제 #2
0
파일: Entity.cs 프로젝트: jtrain184/mgp18
        // constructor:
        public Entity(State parentState, Texture2D sprite, int x, int y)
        {
            this.parentState  = parentState;
            this.pos.X        = x;
            this.pos.Y        = y;
            this.id           = EntityCounter.takeNumber();
            this.sprite       = sprite;
            this.spriteWidth  = sprite.Width;
            this.spriteHeight = sprite.Height;

            // Default values:
            this.active  = true;
            this.visible = true;
        }