Пример #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 );
 }
Пример #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;
        }
Пример #3
0
Файл: Game.cs Проект: zpconn/Gas
 public override void Enter()
 {
     time = 0.0f;
     light = renderer.RegisterNewLight( 150.0f, 1.0f );
 }
Пример #4
0
Файл: Game.cs Проект: zpconn/Gas
 public override void Enter()
 {
     light = renderer.RegisterNewLight( 220.0f, 1.0f );
     goalState = ( int )StateTypes.MainMenu;
 }
Пример #5
0
 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 ) );
 }
Пример #6
0
 /// <summary>
 /// Removes a light from the internal list.
 /// </summary>
 public void RemoveLight( Light light )
 {
     lights.Remove( light );
 }
Пример #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;
 }
Пример #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;
 }