Changeset 8212


Ignore:
Timestamp:
2016-07-28 14:54:13 (7 years ago)
Author:
kaspalmu
Message:
 
Location:
2016/30/KasimirP
Files:
24 added
16 edited

Legend:

Unmodified
Added
Removed
  • 2016/30/KasimirP/Tasohyppelypeli1/Tasohyppelypeli1/Tasohyppelypeli1/Tasohyppelypeli1.cs

    r8172 r8212  
    1616    PlatformCharacter Vihollinen; 
    1717 
     18    PhysicsObject lentokone; 
     19 
    1820    Image pelaajanKuva = LoadImage("Dat_boi1"); 
    1921    Image tahtiKuva = LoadImage("leaf"); 
    2022    Image VihollisenKuva = LoadImage("pepexd"); 
    2123    Image Veri = LoadImage("veri"); 
     24    Image Palikka = LoadImage("Palikka"); 
     25    Image Shrek = LoadImage("Shrekxd"); 
     26    Image kek = LoadImage("art"); 
     27    Image lava = LoadImage("laava"); 
     28    Image Lentsikka = LoadImage("yee"); 
    2229    private Image[] ukkelinKavely = LoadImages("Dat_boi1", "Dat_boi2", "Dat_boi3", "Dat_boi4", "Dat_boi5"); 
    2330 
    24     //SoundEffect maaliAani = LoadSoundEffect("Smoke Weed Everyday Sound Effect"); 
     31    Color[] colors =  { Color.Red, Color.Green, Color.Blue, Color.Yellow, Color.Pink }; 
     32    int index = 0; 
     33 
     34    bool SuperVoima = false; 
     35 
     36    //SoundEffect maaliAani = LoadSoundEffect("illuminati"); 
    2537 
    2638    public override void Begin() 
     
    3042        LuoKentta(); 
    3143        LisaaNappaimet(); 
    32  
     44        Level.CreateBorders(); 
    3345        Camera.Follow(pelaaja1); 
    3446        Camera.ZoomFactor = 1.2; 
     
    4557        kentta.SetTileMethod('N', LisaaPelaaja); 
    4658        kentta.SetTileMethod('X', LisaaVihollinen); 
     59        kentta.SetTileMethod('K', LisaaShrek); 
     60        kentta.SetTileMethod('L', LisaaLaava); 
     61        kentta.SetTileMethod('F', LisaaLentovihu); 
    4762        kentta.Execute(RUUDUN_KOKO, RUUDUN_KOKO); 
    48         Level.CreateBorders(); 
    49         Level.Background.CreateGradient(Color.White, Color.LimeGreen); 
     63         
     64        //Level.Background.CreateGradient(Color.White, Color.LimeGreen); 
     65        Level.Background.Image = kek; 
     66        Level.Background.FitToLevel(); 
     67        Level.Background.TextureWrapSize = new Vector(3, 1); 
     68 
     69        FollowerBrain BRAIN = new FollowerBrain(pelaaja1); 
     70        BRAIN.Speed = 1000; 
     71        BRAIN.DistanceFar = 100; 
     72        BRAIN.FarBrain = new RandomMoverBrain(); 
     73        //lentokone.Brain = BRAIN; 
    5074 
    5175    } 
     
    5579        PhysicsObject taso = PhysicsObject.CreateStaticObject(leveys, korkeus); 
    5680        taso.Position = paikka; 
    57         taso.Color = Color.Green; 
     81        taso.Image = Palikka; 
     82         
     83        //taso.Color = Color.Green; 
    5884        Add(taso); 
     85    } 
     86 
     87    void LisaaLaava(Vector paikka, double leveys, double korkeus) 
     88    { 
     89        PhysicsObject Laava = PhysicsObject.CreateStaticObject(leveys, korkeus); 
     90        Laava.Position = paikka; 
     91        Laava.Image = lava; 
     92        Laava.Tag = "Laava"; 
     93        Add(Laava); 
     94        
     95         
    5996    } 
    6097 
     
    77114        AddCollisionHandler(pelaaja1, "tahti", TormaaTahteen); 
    78115        AddCollisionHandler(pelaaja1, "Vihollinen", TormaaViholliseen); 
     116        AddCollisionHandler(pelaaja1, "Shrek", TormaaShrekiin); 
     117        AddCollisionHandler(pelaaja1, "Laava", TormaaLaavaan); 
     118        AddCollisionHandler(pelaaja1, "Tahti", TormaaTahteen); 
     119         
    79120        Add(pelaaja1); 
    80121        pelaaja1.Animation = new Animation(ukkelinKavely); 
     
    102143        Vihollinen.Brain = tasoAivot; 
    103144 
    104  
     145     
     146 
     147 
     148    } 
     149     
     150    void LisaaLentovihu(Vector paikka, double leveys, double korkeus) 
     151    { 
     152        lentokone = new PhysicsObject(Lentsikka); 
     153        lentokone.Width /= 10; 
     154        lentokone.Height /= 10; 
     155 
     156        lentokone.Position = paikka; 
     157        lentokone.IgnoresGravity = true; 
     158        Add(lentokone);   
     159    } 
     160 
     161    void LisaaShrek(Vector paikka, double leveys, double korkeus) 
     162    { 
     163         
     164        PhysicsObject s = PhysicsObject.CreateStaticObject(Shrek); 
     165        s.Mass = 0; 
     166        s.Position = paikka + new Vector(0, s.Height / 43 / 2); 
     167        s.Width /= 20; 
     168        s.Height /= 20; 
     169        s.Tag = "Shrek"; 
     170 
     171 
     172 
     173        Add(s); 
    105174    } 
    106175 
     
    140209            pelaaja1.Animation.Start(); 
    141210        } 
     211 
     212        /*Level.Background.Color = colors[index]; 
     213 
     214        if (index + 1 >= colors.Length) 
     215        { 
     216            index = 0; 
     217        } 
     218        else 
     219        { 
     220            index++; 
     221        }*/ 
    142222    } 
    143223 
     
    154234    void TormaaTahteen(PhysicsObject hahmo, PhysicsObject tahti) 
    155235    { 
    156         //maaliAani.Play(); 
     236          //§§maaliAani.Play(); 
     237        Supervoima(); 
    157238        MessageDisplay.Add("Keräsit superlehden xd!"); 
    158239        tahti.Destroy(); 
    159240    } 
    160  
     241    //kekeskafjajs 
    161242    void TormaaViholliseen(PhysicsObject a, PhysicsObject b) 
    162243    { 
     244        if (SuperVoima == true) 
     245        { 
     246            ExplosionSystem rajahdusSysteemi = new ExplosionSystem(VihollisenKuva, 50); 
     247 
     248            Add(rajahdusSysteemi); 
     249 
     250            rajahdusSysteemi.AddEffect(b.Position, 50); 
     251            b.Destroy(); 
     252        } 
     253        else 
     254        { 
     255            ExplosionSystem rajahdusSysteemi = new ExplosionSystem(Veri, 50); 
     256 
     257            Add(rajahdusSysteemi); 
     258 
     259            rajahdusSysteemi.AddEffect(a.Position, 50); 
     260            a.Destroy(); 
     261        } 
     262    } 
     263 
     264    void TormaaShrekiin(PhysicsObject a, PhysicsObject b) 
     265    { 
    163266        ExplosionSystem rajahdusSysteemi = new ExplosionSystem(Veri, 50); 
    164          
     267 
    165268        Add(rajahdusSysteemi); 
    166         
     269 
    167270        rajahdusSysteemi.AddEffect(a.Position, 50); 
    168271        a.Destroy(); 
    169  
    170     } 
     272    } 
     273 
     274    void TormaaLaavaan(PhysicsObject a, PhysicsObject b) 
     275    { 
     276        ExplosionSystem rajahdusSysteemi = new ExplosionSystem(Veri, 50); 
     277 
     278        Add(rajahdusSysteemi); 
     279 
     280        rajahdusSysteemi.AddEffect(a.Position, 50); 
     281        a.Destroy(); 
     282    } 
     283 
     284    void Supervoima() 
     285    { 
     286        SuperVoima = true; 
     287        Timer.SingleShot(7, LopetaSuperVoima); 
     288    } 
     289 
     290    void LopetaSuperVoima () 
     291    { 
     292        MessageDisplay.Add("Supervoima loppui xdddd"); 
     293        SuperVoima = false; 
     294    }     
     295     
    171296} 
  • 2016/30/KasimirP/Tasohyppelypeli1/Tasohyppelypeli1/Tasohyppelypeli1/Tasohyppelypeli1.csproj.Debug.cachefile

    r8172 r8212  
    1313Content\veri.xnb 
    1414Content\Shrekxd.xnb 
     15Content\Palikka.xnb 
     16Content\art.xnb 
     17Content\laava.xnb 
     18Content\illuminati.xnb 
     19Content\yee.xnb 
     20Content\illuminati.wma 
  • 2016/30/KasimirP/Tasohyppelypeli1/Tasohyppelypeli1/Tasohyppelypeli1/obj/x86/Debug/ContentPipeline-{FB1067CC-FEED-45F1-8CB8-8F3DD59AB260}.xml

    r8172 r8212  
    3636      <Options>None</Options> 
    3737      <Output>C:\MyTemp\KasimirP\Tasohyppelypeli1\Tasohyppelypeli1\Tasohyppelypeli1\bin\x86\Debug\Content\kentta1.xnb</Output> 
    38       <Time>2016-07-27T14:32:21.8097907+03:00</Time> 
     38      <Time>2016-07-28T14:53:05.2303945+03:00</Time> 
    3939    </Item> 
    4040    <Item> 
     
    117117      <Options>None</Options> 
    118118      <Output>C:\MyTemp\KasimirP\Tasohyppelypeli1\Tasohyppelypeli1\Tasohyppelypeli1\bin\x86\Debug\Content\veri.xnb</Output> 
    119       <Time>2016-07-27T14:38:38.5507907+03:00</Time> 
     119      <Time>2016-07-28T10:04:00.7894497+03:00</Time> 
    120120    </Item> 
    121121    <Item> 
     
    127127      <Output>C:\MyTemp\KasimirP\Tasohyppelypeli1\Tasohyppelypeli1\Tasohyppelypeli1\bin\x86\Debug\Content\Shrekxd.xnb</Output> 
    128128      <Time>2016-07-27T15:00:24.5557907+03:00</Time> 
     129    </Item> 
     130    <Item> 
     131      <Source>Palikka.png</Source> 
     132      <Name>Palikka</Name> 
     133      <Importer>TextureImporter</Importer> 
     134      <Processor>TextureProcessor</Processor> 
     135      <Options>None</Options> 
     136      <Output>C:\MyTemp\KasimirP\Tasohyppelypeli1\Tasohyppelypeli1\Tasohyppelypeli1\bin\x86\Debug\Content\Palikka.xnb</Output> 
     137      <Time>2016-07-28T10:14:45.8071497+03:00</Time> 
     138    </Item> 
     139    <Item> 
     140      <Source>art.jpg</Source> 
     141      <Name>art</Name> 
     142      <Importer>TextureImporter</Importer> 
     143      <Processor>TextureProcessor</Processor> 
     144      <Options>None</Options> 
     145      <Output>C:\MyTemp\KasimirP\Tasohyppelypeli1\Tasohyppelypeli1\Tasohyppelypeli1\bin\x86\Debug\Content\art.xnb</Output> 
     146      <Time>2016-07-28T11:12:43.9249188+03:00</Time> 
     147    </Item> 
     148    <Item> 
     149      <Source>laava.png</Source> 
     150      <Name>laava</Name> 
     151      <Importer>TextureImporter</Importer> 
     152      <Processor>TextureProcessor</Processor> 
     153      <Options>None</Options> 
     154      <Output>C:\MyTemp\KasimirP\Tasohyppelypeli1\Tasohyppelypeli1\Tasohyppelypeli1\bin\x86\Debug\Content\laava.xnb</Output> 
     155      <Time>2016-07-28T11:29:47.2541764+03:00</Time> 
     156    </Item> 
     157    <Item> 
     158      <Source>illuminati.wma</Source> 
     159      <Name>illuminati</Name> 
     160      <Importer>WmaImporter</Importer> 
     161      <Processor>SongProcessor</Processor> 
     162      <Options>None</Options> 
     163      <Output>C:\MyTemp\KasimirP\Tasohyppelypeli1\Tasohyppelypeli1\Tasohyppelypeli1\bin\x86\Debug\Content\illuminati.xnb</Output> 
     164      <Extra>C:\MyTemp\KasimirP\Tasohyppelypeli1\Tasohyppelypeli1\Tasohyppelypeli1\bin\x86\Debug\Content\illuminati.wma</Extra> 
     165      <Time>2016-07-28T12:57:41.3684964+03:00</Time> 
     166    </Item> 
     167    <Item> 
     168      <Source>yee.png</Source> 
     169      <Name>yee</Name> 
     170      <Importer>TextureImporter</Importer> 
     171      <Processor>TextureProcessor</Processor> 
     172      <Options>None</Options> 
     173      <Output>C:\MyTemp\KasimirP\Tasohyppelypeli1\Tasohyppelypeli1\Tasohyppelypeli1\bin\x86\Debug\Content\yee.xnb</Output> 
     174      <Time>2016-07-28T13:36:50.8149752+03:00</Time> 
    129175    </Item> 
    130176    <BuildSuccessful>true</BuildSuccessful> 
  • 2016/30/KasimirP/Tasohyppelypeli1/Tasohyppelypeli1/Tasohyppelypeli1/obj/x86/Debug/Tasohyppelypeli1.csproj.FileListAbsolute.txt

    r8172 r8212  
    2121C:\MyTemp\KasimirP\Tasohyppelypeli1\Tasohyppelypeli1\Tasohyppelypeli1\bin\x86\Debug\Content\veri.xnb 
    2222C:\MyTemp\KasimirP\Tasohyppelypeli1\Tasohyppelypeli1\Tasohyppelypeli1\bin\x86\Debug\Content\Shrekxd.xnb 
     23C:\MyTemp\KasimirP\Tasohyppelypeli1\Tasohyppelypeli1\Tasohyppelypeli1\bin\x86\Debug\Content\Palikka.xnb 
     24C:\MyTemp\KasimirP\Tasohyppelypeli1\Tasohyppelypeli1\Tasohyppelypeli1\bin\x86\Debug\Content\art.xnb 
     25C:\MyTemp\KasimirP\Tasohyppelypeli1\Tasohyppelypeli1\Tasohyppelypeli1\bin\x86\Debug\Content\laava.xnb 
     26C:\MyTemp\KasimirP\Tasohyppelypeli1\Tasohyppelypeli1\Tasohyppelypeli1\bin\x86\Debug\Content\illuminati.xnb 
     27C:\MyTemp\KasimirP\Tasohyppelypeli1\Tasohyppelypeli1\Tasohyppelypeli1\bin\x86\Debug\Content\illuminati.wma 
     28C:\MyTemp\KasimirP\Tasohyppelypeli1\Tasohyppelypeli1\Tasohyppelypeli1\bin\x86\Debug\Content\yee.xnb 
  • 2016/30/KasimirP/Tasohyppelypeli1/Tasohyppelypeli1/Tasohyppelypeli1/obj/x86/Debug/cachefile-{FB1067CC-FEED-45F1-8CB8-8F3DD59AB260}-targetpath.txt

    r8172 r8212  
    1313Content\veri.xnb 
    1414Content\Shrekxd.xnb 
     15Content\Palikka.xnb 
     16Content\art.xnb 
     17Content\laava.xnb 
     18Content\illuminati.xnb 
     19Content\illuminati.wma 
     20Content\yee.xnb 
  • 2016/30/KasimirP/Tasohyppelypeli1/Tasohyppelypeli1/Tasohyppelypeli1Content/Tasohyppelypeli1Content.contentproj

    r8172 r8212  
    116116  </ItemGroup> 
    117117  <ItemGroup> 
     118    <Compile Include="Shrekxd.png"> 
     119      <Name>Shrekxd</Name> 
     120      <Importer>TextureImporter</Importer> 
     121      <Processor>TextureProcessor</Processor> 
     122    </Compile> 
     123  </ItemGroup> 
     124  <ItemGroup> 
    118125    <Compile Include="veri.png"> 
    119126      <Name>veri</Name> 
     
    123130  </ItemGroup> 
    124131  <ItemGroup> 
    125     <Compile Include="Shrekxd.png"> 
    126       <Name>Shrekxd</Name> 
     132    <Compile Include="Palikka.png"> 
     133      <Name>Palikka</Name> 
     134      <Importer>TextureImporter</Importer> 
     135      <Processor>TextureProcessor</Processor> 
     136    </Compile> 
     137  </ItemGroup> 
     138  <ItemGroup> 
     139    <Compile Include="art.jpg"> 
     140      <Name>art</Name> 
     141      <Importer>TextureImporter</Importer> 
     142      <Processor>TextureProcessor</Processor> 
     143    </Compile> 
     144  </ItemGroup> 
     145  <ItemGroup> 
     146    <Compile Include="laava.png"> 
     147      <Name>laava</Name> 
     148      <Importer>TextureImporter</Importer> 
     149      <Processor>TextureProcessor</Processor> 
     150    </Compile> 
     151  </ItemGroup> 
     152  <ItemGroup> 
     153    <Compile Include="illuminati.wma"> 
     154      <Name>illuminati</Name> 
     155      <Importer>WmaImporter</Importer> 
     156      <Processor>SongProcessor</Processor> 
     157    </Compile> 
     158  </ItemGroup> 
     159  <ItemGroup> 
     160    <Compile Include="yee.png"> 
     161      <Name>yee</Name> 
    127162      <Importer>TextureImporter</Importer> 
    128163      <Processor>TextureProcessor</Processor> 
  • 2016/30/KasimirP/Tasohyppelypeli1/Tasohyppelypeli1/Tasohyppelypeli1Content/kentta1.txt

    r8172 r8212  
    1 ..................................... 
    2                                                                         . 
    3 ............................#######.............                                         
    4 .......................X........................X.......#### 
    5 .N..................######....................######## 
    6 ........**********...............*........................ 
    7 ##################.............#####...#### 
     1 
     2 
     3............................#######.......................X....X...X......X...X.........X*................. 
     4.......................X.................###....X.......########################........###................ 
     5.N..................######.....................########..........................X......................... 
     6.................................*.............................................#####....................... 
     7##################.............#####...####................................................................ 
     8##################LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL 
Note: See TracChangeset for help on using the changeset viewer.