/// <summary> /// Initializes a new instance of LightNode. /// </summary> public LightNode( Renderer renderer, SceneGraph sceneGraph, Matrix localTransform, float range, float intensity, Color lightColor) : base(renderer, sceneGraph) { Vector2 pos = Vector2.TransformCoordinate( new Vector2(), localTransform ); light = renderer.RegisterNewLight( range, intensity, pos, lightColor ); }
public ExplodingProjectile( Renderer renderer, Vector2 startPos, Vector2 direction, Vector2 initialVelocity, Scene scene) : base(renderer, startPos, direction, initialVelocity) { lifetime = config.GetSetting<float>( "ExplodingProjectileTimer" ); clusterSize = config.GetSetting<int>( "ExplodingProjectileClusterSize" ); projectileDamage = config.GetSetting<float>( "ExplodingProjectileDamage" ); speed = config.GetSetting<float>( "ExplodingProjectileSpeed" ); mesh = renderer.CreateCircularMesh(Color.Black, 13.0f, 6 ); light = renderer.RegisterNewLight( 200.0f, 1.0f, startPos, Color.Red ); this.velocity = initialVelocity + direction * speed; this.scene = scene; }
public override void Enter() { time = 0.0f; light = renderer.RegisterNewLight( 150.0f, 1.0f ); }
public override void Enter() { light = renderer.RegisterNewLight( 220.0f, 1.0f ); goalState = ( int )StateTypes.MainMenu; }
public void Begin() { playerBotLight = renderer.RegisterNewLight( 200.0f, 1.0f, new Vector2(), Color.FromArgb( 255, 255, 0 ) ); cpuBotLight = renderer.RegisterNewLight( 200.0f, 1.0f, new Vector2(), Color.FromArgb( 255, 0, 255 ) ); }
/// <summary> /// Removes a light from the internal list. /// </summary> public void RemoveLight( Light light ) { lights.Remove( light ); }
/// <summary> /// Adds a new light to the light list and returns a reference to it. /// </summary> public Light RegisterNewLight( float range, float intensity, Vector2 position, Color color ) { Light light = new Light( this, range, intensity, position, color ); lights.Add( light ); return light; }
/// <summary> /// Adds a new light to the light list and returns a reference to it. /// </summary> public Light RegisterNewLight( float range, float intensity ) { Light light = new Light( this, range, intensity ); lights.Add( light ); return light; }