Changeset 2799 for 2012/23


Ignore:
Timestamp:
2012-06-05 15:54:26 (11 years ago)
Author:
ramipasa
Message:

plaah,....

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  
    2626            : base(game) 
    2727        { 
     28             
    2829            // TODO: Construct any child components here 
    2930        } 
     
    7576            genExplosion.DisappearingRate = 2.5; 
    7677            genExplosion.InitialVisibilityRate = 25.0; 
    77             genExplosion.TimeEntirelyVisible = 200; 
     78            genExplosion.TimeEntirelyVisible = 5; 
    7879            genExplosion.Texture = ALTKHandler.Loader.loadTexture("gen_explosion"); 
    7980 
     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 
    80113            StaticAnimTypes.Add(genExplosion); 
     114            StaticAnimTypes.Add(stars1); 
     115            StaticAnimTypes.Add(stars2); 
     116            StaticAnimTypes.Add(starSmoke); 
     117            StaticAnimTypes.Add(galaxy); 
    81118        } 
    82119 
     
    192229        public override void Draw(GameTime gameTime) 
    193230        { 
    194             spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.NonPremultiplied); 
     231            GraphicsDevice device = spriteBatch.GraphicsDevice; 
     232            spriteBatch.Begin(SpriteSortMode.Immediate, BlendState.NonPremultiplied); 
    195233 
    196234            for (int sAnimId = 0; sAnimId < AnimInstances.Count; sAnimId++) 
  • 2012/23/RamiP/YAG2DSSBase/YAG2DSS/YAG2DSS/YAG2DSS.cs

    r2795 r2799  
    2020 
    2121    Timer Madonreikaajastin; 
     22    Timer Minioniajastin; 
     23 
     24    List<int> PelaajanKesto = new List<int>(); 
    2225 
    2326    public override void Begin() 
     
    4245    { 
    4346        PhysicsObject vasenReuna = Level.CreateLeftBorder(); 
    44         //vasenReuna.IsVisible = false; 
     47        vasenReuna.IsVisible = false; 
    4548        PhysicsObject oikeaReuna = Level.CreateRightBorder(); 
    46         //oikeaReuna.IsVisible = false; 
     49        oikeaReuna.IsVisible = false; 
    4750        PhysicsObject ylaReuna = Level.CreateTopBorder(); 
    48         //ylaReuna.IsVisible = false; 
     51        ylaReuna.IsVisible = false; 
    4952        PhysicsObject alaReuna = Level.CreateBottomBorder(); 
    50         //alaReuna.IsVisible = false; 
     53        alaReuna.IsVisible = false; 
    5154 
    5255        Level.BackgroundColor = Color.Black; 
     
    6669        pelaaja.Shape = Shape.Triangle; 
    6770        pelaaja.Angle = Angle.FromDegrees(pelaaja.Angle.Degrees + 90); 
    68  
     71        PelaajanKesto.Add(100); 
    6972        Pelaaja.Add(pelaaja); 
    7073        Add(Pelaaja[Pelaaja.Count - 1]); 
     
    7477    { 
    7578        Madonreikaajastin = new Timer(); 
    76         Madonreikaajastin.Interval = 2; 
     79        Madonreikaajastin.Interval = 3; 
    7780        Madonreikaajastin.Timeout += new Action(NaytaAnimaatio); 
    7881        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     
    81100    void NaytaAnimaatio() 
    82101    { 
     
    273292        altkHandler.Initialize(); 
    274293        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        } 
    275299    } 
    276300 
  • 2012/23/RamiP/YAG2DSSBase/YAG2DSS/YAG2DSS/YAG2DSS.csproj

    r2778 r2799  
    120120    <Compile Include="ALTKEngine\KeyboardEventInput.cs" /> 
    121121    <Compile Include="ALTKEngine\Loader.cs" /> 
     122    <Compile Include="ALTKEngine\StaticAnimHandler.cs" /> 
    122123    <Compile Include="ALTKHandler.cs" /> 
    123124    <Compile Include="GUI\ACheckBox.cs" /> 
     
    130131    <Compile Include="GUI\Dialogs\ExitWindow.cs" /> 
    131132    <Compile Include="Ohjelma.cs" /> 
    132     <Compile Include="ALTKEngine\StaticAnimHandler.cs" /> 
    133133    <Compile Include="YAG2DSS.cs" /> 
    134134    <Compile Include="Properties\AssemblyInfo.cs" /> 
  • 2012/23/RamiP/YAG2DSSBase/YAG2DSS/YAG2DSSContent/YAG2DSSContent.contentproj

    r2768 r2799  
    7575    </None> 
    7676  </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> 
    77103  <Import Project="$(MSBuildExtensionsPath)\Microsoft\XNA Game Studio\$(XnaFrameworkVersion)\Microsoft.Xna.GameStudio.ContentPipeline.targets" /> 
    78104  <!--  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.