- Timestamp:
- 2012-06-05 15:54:26 (11 years ago)
- Location:
- 2012/23/RamiP/YAG2DSSBase/YAG2DSS
- Files:
-
- 4 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
2012/23/RamiP/YAG2DSSBase/YAG2DSS/YAG2DSS/ALTKEngine/StaticAnimHandler.cs
r2768 r2799 26 26 : base(game) 27 27 { 28 28 29 // TODO: Construct any child components here 29 30 } … … 75 76 genExplosion.DisappearingRate = 2.5; 76 77 genExplosion.InitialVisibilityRate = 25.0; 77 genExplosion.TimeEntirelyVisible = 200;78 genExplosion.TimeEntirelyVisible = 5; 78 79 genExplosion.Texture = ALTKHandler.Loader.loadTexture("gen_explosion"); 79 80 81 StaticAnimationType stars1 = new StaticAnimationType("STARS_1"); 82 stars1.DisappearingRate = 0.5; 83 stars1.InitialVisibilityRate = 0.75; 84 stars1.TimeEntirelyVisible = 0; 85 stars1.TimeWithMinOpacity = 5; 86 stars1.MinimumOpacity = 0.2; 87 stars1.Texture = ALTKHandler.Loader.loadTexture("backgroundStars1"); 88 89 StaticAnimationType stars2 = new StaticAnimationType("STARS_2"); 90 stars2.DisappearingRate = 0.35; 91 stars2.InitialVisibilityRate = 0.55; 92 stars2.TimeEntirelyVisible = 0; 93 stars2.TimeWithMinOpacity = 5; 94 stars2.MinimumOpacity = 0.4; 95 stars2.Texture = ALTKHandler.Loader.loadTexture("backgroundStars2"); 96 97 StaticAnimationType starSmoke = new StaticAnimationType("STARSMOKE"); 98 starSmoke.DisappearingRate = 0.40; 99 starSmoke.InitialVisibilityRate = 0.25; 100 starSmoke.TimeEntirelyVisible = 0; 101 starSmoke.TimeWithMinOpacity = 5; 102 starSmoke.MinimumOpacity = 0.25; 103 starSmoke.Texture = ALTKHandler.Loader.loadTexture("background_starsmoke"); 104 105 StaticAnimationType galaxy = new StaticAnimationType("GALAXY"); 106 galaxy.DisappearingRate = 0.80; 107 galaxy.InitialVisibilityRate = 0.15; 108 galaxy.TimeEntirelyVisible = 0; 109 galaxy.TimeWithMinOpacity = 5; 110 galaxy.MinimumOpacity = 0.25; 111 galaxy.Texture = ALTKHandler.Loader.loadTexture("background_galaxy"); 112 80 113 StaticAnimTypes.Add(genExplosion); 114 StaticAnimTypes.Add(stars1); 115 StaticAnimTypes.Add(stars2); 116 StaticAnimTypes.Add(starSmoke); 117 StaticAnimTypes.Add(galaxy); 81 118 } 82 119 … … 192 229 public override void Draw(GameTime gameTime) 193 230 { 194 spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.NonPremultiplied); 231 GraphicsDevice device = spriteBatch.GraphicsDevice; 232 spriteBatch.Begin(SpriteSortMode.Immediate, BlendState.NonPremultiplied); 195 233 196 234 for (int sAnimId = 0; sAnimId < AnimInstances.Count; sAnimId++) -
2012/23/RamiP/YAG2DSSBase/YAG2DSS/YAG2DSS/YAG2DSS.cs
r2795 r2799 20 20 21 21 Timer Madonreikaajastin; 22 Timer Minioniajastin; 23 24 List<int> PelaajanKesto = new List<int>(); 22 25 23 26 public override void Begin() … … 42 45 { 43 46 PhysicsObject vasenReuna = Level.CreateLeftBorder(); 44 //vasenReuna.IsVisible = false;47 vasenReuna.IsVisible = false; 45 48 PhysicsObject oikeaReuna = Level.CreateRightBorder(); 46 //oikeaReuna.IsVisible = false;49 oikeaReuna.IsVisible = false; 47 50 PhysicsObject ylaReuna = Level.CreateTopBorder(); 48 //ylaReuna.IsVisible = false;51 ylaReuna.IsVisible = false; 49 52 PhysicsObject alaReuna = Level.CreateBottomBorder(); 50 //alaReuna.IsVisible = false;53 alaReuna.IsVisible = false; 51 54 52 55 Level.BackgroundColor = Color.Black; … … 66 69 pelaaja.Shape = Shape.Triangle; 67 70 pelaaja.Angle = Angle.FromDegrees(pelaaja.Angle.Degrees + 90); 68 71 PelaajanKesto.Add(100); 69 72 Pelaaja.Add(pelaaja); 70 73 Add(Pelaaja[Pelaaja.Count - 1]); … … 74 77 { 75 78 Madonreikaajastin = new Timer(); 76 Madonreikaajastin.Interval = 2;79 Madonreikaajastin.Interval = 3; 77 80 Madonreikaajastin.Timeout += new Action(NaytaAnimaatio); 78 81 Madonreikaajastin.Start(); 79 } 80 82 83 Minioniajastin = new Timer(); 84 Minioniajastin.Interval = 2; 85 Minioniajastin.Timeout += new Action(Minioniajastin_Timeout); 86 Minioniajastin.Start(); 87 } 88 89 void Minioniajastin_Timeout() 90 { 91 Timer.SingleShot(2, AjaLuoMinioni); 92 } 93 94 void AjaLuoMinioni() 95 { 96 for (int Madonreikaa = 0; Madonreikaa < Madonreika.Count; Madonreikaa++) 97 LuoMinioni(Madonreikaa); 98 } 99 81 100 void NaytaAnimaatio() 82 101 { … … 273 292 altkHandler.Initialize(); 274 293 this.Components.Add(altkHandler); 294 295 for (int a = 1; a < 5; a++) 296 { 297 ALTKHandler.StaticAnimHandler.AddStaticAnim(a, new Microsoft.Xna.Framework.Vector2(0, 0)); 298 } 275 299 } 276 300 -
2012/23/RamiP/YAG2DSSBase/YAG2DSS/YAG2DSS/YAG2DSS.csproj
r2778 r2799 120 120 <Compile Include="ALTKEngine\KeyboardEventInput.cs" /> 121 121 <Compile Include="ALTKEngine\Loader.cs" /> 122 <Compile Include="ALTKEngine\StaticAnimHandler.cs" /> 122 123 <Compile Include="ALTKHandler.cs" /> 123 124 <Compile Include="GUI\ACheckBox.cs" /> … … 130 131 <Compile Include="GUI\Dialogs\ExitWindow.cs" /> 131 132 <Compile Include="Ohjelma.cs" /> 132 <Compile Include="ALTKEngine\StaticAnimHandler.cs" />133 133 <Compile Include="YAG2DSS.cs" /> 134 134 <Compile Include="Properties\AssemblyInfo.cs" /> -
2012/23/RamiP/YAG2DSSBase/YAG2DSS/YAG2DSSContent/YAG2DSSContent.contentproj
r2768 r2799 75 75 </None> 76 76 </ItemGroup> 77 <ItemGroup> 78 <None Include="Textures\backgroundStars1.png"> 79 <Name>backgroundStars1</Name> 80 <Importer>TextureImporter</Importer> 81 <Processor>TextureProcessor</Processor> 82 <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> 83 </None> 84 <None Include="Textures\backgroundStars2.png"> 85 <Name>backgroundStars2</Name> 86 <Importer>TextureImporter</Importer> 87 <Processor>TextureProcessor</Processor> 88 <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> 89 </None> 90 <None Include="Textures\background_galaxy.png"> 91 <Name>background_galaxy</Name> 92 <Importer>TextureImporter</Importer> 93 <Processor>TextureProcessor</Processor> 94 <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> 95 </None> 96 <None Include="Textures\background_starsmoke.png"> 97 <Name>background_starsmoke</Name> 98 <Importer>TextureImporter</Importer> 99 <Processor>TextureProcessor</Processor> 100 <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> 101 </None> 102 </ItemGroup> 77 103 <Import Project="$(MSBuildExtensionsPath)\Microsoft\XNA Game Studio\$(XnaFrameworkVersion)\Microsoft.Xna.GameStudio.ContentPipeline.targets" /> 78 104 <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Note: See TracChangeset
for help on using the changeset viewer.