Jypeli  9
The simple game programming library
Effects.cs
Siirry tämän tiedoston dokumentaatioon.
1 using System;
2 using System.Collections.Generic;
3 using Jypeli.Effects;
4 
5 namespace Jypeli
6 {
7  public partial class Game
8  {
9  private static List<Light> lights = new List<Light>();
10 
11 #if !WINDOWS_PHONE
12  internal static List<Light> Lights { get { return lights; } }
16 #endif
17 
21  public static Vector Wind { get; set; }
22 
27  public void Add(Light light)
28  {
29 #if !WINDOWS_PHONE
30  if (light == null) throw new NullReferenceException("Tried to add a null light to game");
31 
32  if (lights.Count >= 1)
33  throw new NotSupportedException("Only one light is supported");
34 
35  lights.Add(light);
36 #endif
37  }
38 
42  public void ClearLights()
43  {
44 #if !WINDOWS_PHONE
45 
46  lights.Clear();
47 #endif
48  }
49  }
50 }
Jypeli.Game.Lights
static List< Light > Lights
Valoefektit.
Definition: Effects.cs:15
Jypeli.Effects.Light
Pistemäinen valonlähde.
Definition: Light.cs:33
Jypeli
Definition: Automobile.cs:5
Jypeli.Game.Add
void Add(Light light)
Lisää valon peliin. Nykyisellään valoja voi olla ainoastaan yksi kappale. Toistaiseksi ei tuettu Wind...
Definition: Effects.cs:27
Jypeli.Game.ClearLights
void ClearLights()
Poistaa kaikki valoefektit.
Definition: Effects.cs:42
Jypeli.Game.Wind
static Vector Wind
Tuuli. Vaikuttaa vain efekteihin
Definition: Effects.cs:21
Jypeli.Game.lights
static List< Light > lights
Definition: Effects.cs:9
Jypeli.Vector
2D-vektori.
Definition: Vector.cs:59
System
Definition: CFFauxAttributes.cs:29
Jypeli.Effects
Definition: ExplosionSystem.cs:4