Exemplo n.º 1
0
 /// <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 );
 }
Exemplo n.º 2
0
        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;
        }
Exemplo n.º 3
0
Arquivo: Game.cs Projeto: zpconn/Gas
 public override void Enter()
 {
     time = 0.0f;
     light = renderer.RegisterNewLight( 150.0f, 1.0f );
 }
Exemplo n.º 4
0
Arquivo: Game.cs Projeto: zpconn/Gas
 public override void Enter()
 {
     light = renderer.RegisterNewLight( 220.0f, 1.0f );
     goalState = ( int )StateTypes.MainMenu;
 }
Exemplo n.º 5
0
Arquivo: Scene.cs Projeto: zpconn/Gas
 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 ) );
 }
Exemplo n.º 6
0
 /// <summary>
 /// Removes a light from the internal list.
 /// </summary>
 public void RemoveLight( Light light )
 {
     lights.Remove( light );
 }
Exemplo n.º 7
0
 /// <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;
 }
Exemplo n.º 8
0
 /// <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;
 }