Ejemplo n.º 1
0
        //-----------------------------------------------------------------------------
        // Static methods
        //-----------------------------------------------------------------------------

        // Instantiate an event tile from the given event-data.
        public static EventTile CreateEvent(EventTileDataInstance data)
        {
            EventTile tile;

            // Construct the tile.
            if (data.Type == null)
            {
                tile = new EventTile();
            }
            else
            {
                tile = (EventTile)data.Type.GetConstructor(Type.EmptyTypes).Invoke(null);
            }

            tile.position  = data.Position;
            tile.eventData = data;
            tile.size      = data.Size;
            tile.properties.SetAll(data.BaseProperties);
            tile.properties.SetAll(data.Properties);
            tile.properties.BaseProperties = data.Properties;

            return(tile);
        }
Ejemplo n.º 2
0
        //-----------------------------------------------------------------------------
        // Static methods
        //-----------------------------------------------------------------------------
        // Instantiate an event tile from the given event-data.
        public static EventTile CreateEvent(EventTileDataInstance data)
        {
            EventTile tile;

            // Construct the tile.
            if (data.Type == null)
                tile = new EventTile();
            else
                tile = (EventTile) data.Type.GetConstructor(Type.EmptyTypes).Invoke(null);

            tile.position	= data.Position;
            tile.eventData	= data;
            tile.size		= data.Size;
            tile.properties.SetAll(data.BaseProperties);
            tile.properties.SetAll(data.Properties);
            tile.properties.BaseProperties	= data.Properties;

            return tile;
        }
Ejemplo n.º 3
0
 // Put an event tile into the room.
 public void AddEventTile(EventTile eventTile)
 {
     eventTile.Initialize(this);
     eventTiles.Add(eventTile);
 }