// Use this for initialization void Start() { this.m_tileMap = this.GetComponentInChildren <TileMap>(); this.m_entityMap = this.GetComponentInChildren <EntityMap>(); this.m_lightingMap = this.GetComponentInChildren <LightingMap>(); this.ResetGame(); }
public static Photo Process(Photo original, float c, LightingMap map) { Photo photo = new Photo(original.Width, original.Height); for (int x = 0; x < photo.Width; x++) { for (int y = 0; y < photo.Height; y++) { //photo[x, y] = original[x, y] * c; if (map != null) { photo[x, y] = new Pixel(original[x, y].X, original[x, y].Y, original[x, y].A, original[x, y].R * Pixel.Trim(map[x, y].X), original[x, y].G * Pixel.Trim(map[x, y].Y), original[x, y].B * Pixel.Trim(map[x, y].Z)); } } } return(photo); }
//Global functions to reset the state of the game public void ResetGame() { //For debugging purposes. If the game hasn't been started I still want to render the map for testing if (this.m_tileMap == null) { this.m_tileMap = this.GetComponentInChildren <TileMap>(); } if (this.m_entityMap == null) { this.m_entityMap = this.GetComponentInChildren <EntityMap>(); } if (this.m_lightingMap == null) { this.m_lightingMap = this.GetComponentInChildren <LightingMap>(); } this.ResetMap(); }
public LightingFilter(LightingMap map, float c) { this.Map = map; this.c = c; }