Exemplo n.º 1
0
        public MenuItem(string text, State.MenuState target){
            this.text = text;
            this.target = target;

            if (this.target == State.MenuState.NULL)
                this.disabled = true;
        }
Exemplo n.º 2
0
        public BaseComponent getComponent(State.ComponentType type){
            foreach(BaseComponent c in this.components){
                if (c.type == type)
                    return c;
            }

            return null;
        }
Exemplo n.º 3
0
        public virtual GraphicsSet getGraphicsByState(State.EntityState state){
            foreach(KeyValuePair<State.EntityState, GraphicsSet> pair in this.graphics){
                if (pair.Key == state)
                    return pair.Value;
            }

            return null;
        }
Exemplo n.º 4
0
        public virtual bool contains(State.EntityState state){
            foreach (KeyValuePair<State.EntityState, GraphicsSet> pair in this.graphics){
                if (pair.Key == state)
                    return true;
            }

            return false;
        }
Exemplo n.º 5
0
        public virtual GameTexture getCurrentGraphic(ref State.DirectionState orientation){
            switch(orientation){
                case State.DirectionState.EAST: return this.east;
                case State.DirectionState.NORTH: return this.north;
                case State.DirectionState.NORTH_EAST: return this.north_east;
                case State.DirectionState.NORTH_WEST: return this.north_west;
                case State.DirectionState.SOUTH: return this.south;
                case State.DirectionState.SOUTH_EAST: return this.south_east;
                case State.DirectionState.SOUTH_WEST: return this.south_west;
                case State.DirectionState.WEST: return this.west;
            }

            return null;
        }
Exemplo n.º 6
0
 public virtual void addGraphics(State.EntityState state, GraphicsSet set){
     if (!this.contains(state))
         this.graphics.Add(new KeyValuePair<State.EntityState, GraphicsSet>(state, set));
 }
Exemplo n.º 7
0
        public MenuItemWithInput(string text, State.MenuState target):this(text){

        }
Exemplo n.º 8
0
 public MenuItem(string text, State.MenuState target, bool disabled) : this(text, target){
     this.disabled = disabled;
 }