Ejemplo n.º 1
0
        //public GraphicsSet(State.EntityState state){
        //    this.state = state;
        //}

        public virtual void addGraphics(string state, string name, int frameWidth, int frameHeight){

            if(state == null && this.south == null){
                this.south = this.makeGameTexture(name, frameWidth, frameHeight);
                return;
            }

            switch (state.ToUpper())
            {
                case "NORTH": north = this.makeGameTexture(name, frameWidth, frameHeight); break;
                case "NORTHEAST": north_east = this.makeGameTexture(name, frameWidth, frameHeight); break;
                case "EAST": east = this.makeGameTexture(name, frameWidth, frameHeight); break;
                case "SOUTH": south = this.makeGameTexture(name, frameWidth, frameHeight); break;
                case "SOUTHEAST": south_east = this.makeGameTexture(name, frameWidth, frameHeight); break;
                case "SOUTHWEST": south_west = this.makeGameTexture(name, frameWidth, frameHeight); break;
                case "WEST": west = this.makeGameTexture(name, frameWidth, frameHeight); break;
                case "NORTHWEST": north_west = this.makeGameTexture(name, frameWidth, frameHeight); break;
                default: return;
            }
        }
Ejemplo n.º 2
0
 public WorldEntity(string name, bool passable, GameTexture texture){
     this.name = name;
     this.passable = passable;
     this.texture = texture;
 }