Exemplo n.º 1
0
        public FieldEntry GetFieldEntry(int X, int Y)
        {
            FieldEntry result = null;

            if (X >= 0 && X < W && Y >= 0 && Y < H)
            {
                string temp = Sign.Substring(6);
                temp = "Field_" + temp + Convert.ToString(X) + Convert.ToString(Y);

                result = (FieldEntry)((NWDatabase)Owner).FindEntryBySign(temp);
            }
            return(result);
        }
Exemplo n.º 2
0
        private DataEntry CreateEntry(sbyte kind)
        {
            DataEntry result;

            switch (kind)
            {
            case DataEntry.ek_Item:
                result = new ItemEntry(this);
                break;

            case DataEntry.ek_Creature:
                result = new CreatureEntry(this);
                break;

            case DataEntry.ek_Land:
                result = new LandEntry(this);
                break;

            case DataEntry.ek_Layer:
                result = new LayerEntry(this);
                break;

            case DataEntry.ek_Field:
                result = new FieldEntry(this);
                break;

            case DataEntry.ek_EventHandler:
                result = new EventHandlerEntry(this);
                break;

            case DataEntry.ek_Information:
                result = new InfoEntry(this);
                break;

            case DataEntry.ek_Material:
                result = new MaterialEntry(this);
                break;

            default:
                result = new InfoEntry(this);
                break;
            }

            return(result);
        }