Changeset 1060


Ignore:
Timestamp:
2010-07-05 14:21:11 (13 years ago)
Author:
sijoseha
Message:

Testejä

Location:
2010/24/sijoseha/EfektiDemo
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • 2010/24/sijoseha/EfektiDemo/EfektiDemo.csproj

    r1040 r1060  
    5757  </PropertyGroup> 
    5858  <ItemGroup> 
    59     <Reference Include="Jypeli2, Version=2.3.0.0, Culture=neutral, processorArchitecture=x86"> 
     59    <Reference Include="Jypeli2, Version=2.3.1.0, Culture=neutral, processorArchitecture=x86"> 
    6060      <SpecificVersion>False</SpecificVersion> 
    61       <HintPath>..\Jypeli\bin\x86\Debug\Jypeli2.dll</HintPath> 
     61      <HintPath>..\lib\Jypeli2.dll</HintPath> 
    6262    </Reference> 
    6363    <Reference Include="Microsoft.Xna.Framework, Version=3.1.0.0, Culture=neutral, PublicKeyToken=6d5c3888ef60e27d" /> 
  • 2010/24/sijoseha/EfektiDemo/Ohjelma.cs

    r1004 r1060  
    1010        using (Peli game = new Peli()) 
    1111        { 
     12            game.IsFullScreen = true; 
    1213            game.Run(); 
    1314        } 
  • 2010/24/sijoseha/EfektiDemo/Peli.cs

    r1040 r1060  
    1010    ExplosionSystem rajahdys1, rajahdys2, rajahdys3, rajahdys4; 
    1111    Flames liekki1, liekki2; 
     12    PhysicsObject kuula; 
    1213    protected override void Begin() 
    1314    { 
    14         PhysicsObject kuula = new PhysicsObject(20, 20); 
     15        kuula = new PhysicsObject(20, 20); 
    1516        kuula.Position = new Vector(0, 0); 
     17        kuula.IsVisible = false; 
    1618        Add(kuula); 
    1719        Level.BackgroundColor = Color.Black; 
     
    1921        Image glow = LoadImage("Red"); 
    2022        Image glow2 = LoadImage("Yellow"); 
    21         rajahdys1 = new ExplosionSystem(expl, glow, 1000); 
     23        rajahdys1 = new ExplosionSystem(expl, 1000); 
    2224        rajahdys2 = new ExplosionSystem(expl, 1000); 
    2325        rajahdys3 = new ExplosionSystem(glow, 1000); 
    24         rajahdys4 = new ExplosionSystem(glow2, 10); 
     26        rajahdys4 = new ExplosionSystem(glow2, 4); 
    2527        liekki1 = new Flames(glow, glow2, 400, Angle.Degrees(270)); 
    2628        liekki2 = new Flames(glow2, 400, Angle.Degrees(270)); 
    27         liekki1.Position = new Vector(-200, 0); 
     29        liekki1.Position = new Vector(-100, 0); 
     30        liekki1.MaxVelocity = 0; 
     31        liekki1.MinVelocity = 0; 
     32        liekki2.Position = new Vector(100, 0); 
    2833        rajahdys2.MinLifetime = 0.2; 
    2934        rajahdys2.MaxLifetime = 0.4; 
     
    3843        rajahdys4.MinVelocity = 1; 
    3944        rajahdys4.MaxVelocity = 2; 
    40         Add(rajahdys1); 
    41         //Add(rajahdys2); 
     45        //Add(rajahdys1); 
     46        Add(rajahdys2); 
     47        rajahdys2.SourceObject = kuula; 
    4248        //Add(rajahdys3); 
    4349        //Add(rajahdys4); 
    44         Add(liekki1); 
     50        //Add(liekki1); 
    4551        //liekki1.SourceObject = kuula; 
    4652        //Add(liekki2); 
    4753 
    48         ps = new ParticleSystem(glow, 10); 
     54        ps = new ParticleSystem(glow, glow2, 100, true); 
    4955        ps.MaxAcceleration = 1; 
    50         ps.MaxLifetime = 1; 
     56        ps.MaxLifetime = 0.6; 
    5157        ps.MaxRotation = 0; 
    5258        ps.MaxRotationSpeed = 0; 
     
    5460        ps.MaxVelocity = 10; 
    5561        ps.MinAcceleration = 1; 
    56         ps.MinLifetime = 1; 
     62        ps.MinLifetime = 0.4; 
    5763        ps.MinRotation = 0; 
    5864        ps.MinRotationSpeed = 0; 
    59         ps.MinScale = 1; 
     65        ps.MinScale = 0.5; 
    6066        ps.MinVelocity = 10; 
    61         //Add(ps); 
     67        Add(ps); 
     68        //ps.SourceObject = kuula; 
    6269 
    6370        Timer t = new Timer(); 
    64         t.Interval = 1; 
     71        t.Interval = 0.01; 
    6572        t.Trigger += new Timer.TriggerHandler(t_Trigger1); 
    6673        Add(t); 
     
    9097    void t_Trigger1(Timer sender) 
    9198    { 
    92         ps.AddEffect(0, 0, 4); 
     99        ps.AddEffect(RandomGen.NextDouble(Level.Left, Level.Right), RandomGen.NextDouble(Level.Top, Level.Bottom), 2); 
    93100        rajahdys1.AddEffect(RandomGen.NextDouble(Level.Left, Level.Right), RandomGen.NextDouble(Level.Top, Level.Bottom), 30); 
    94101        rajahdys3.AddEffect(RandomGen.NextDouble(Level.Left, Level.Right), RandomGen.NextDouble(Level.Top, Level.Bottom), 30); 
     
    110117        rajahdys4.AddEffect(RandomGen.NextDouble(Level.Left, Level.Right), RandomGen.NextDouble(Level.Top, Level.Bottom), 1); 
    111118    } 
     119    protected override void Update(Time time) 
     120    { 
     121        kuula.Position = Mouse.PositionOnWorld; 
     122        base.Update(time); 
     123    } 
    112124} 
Note: See TracChangeset for help on using the changeset viewer.