예제 #1
0
파일: LightNode.cs 프로젝트: zpconn/Gas
 /// <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
파일: Scene.cs 프로젝트: 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 ) );
 }
예제 #6
0
파일: Renderer.cs 프로젝트: zpconn/Gas
 /// <summary>
 /// Removes a light from the internal list.
 /// </summary>
 public void RemoveLight( Light light )
 {
     lights.Remove( light );
 }
예제 #7
0
파일: Renderer.cs 프로젝트: zpconn/Gas
 /// <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
파일: Renderer.cs 프로젝트: zpconn/Gas
 /// <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;
 }