Changeset 7851 for 2016/24


Ignore:
Timestamp:
2016-07-06 11:14:35 (3 years ago)
Author:
juleppaa
Message:
 
Location:
2016/24/JustusL/Object_Ball/Object_Ball
Files:
12 edited

Legend:

Unmodified
Added
Removed
  • 2016/24/JustusL/Object_Ball/Object_Ball/Object_Ball/Object_Ball.cs

    r7821 r7851  
    4242        Gravity = new Vector(0, -70); 
    4343 
    44         Level.Width = 10000; 
    45         Level.Height = 10000; 
    46         Level.CreateBorders(); 
     44        
    4745 
    4846        //Level.Background.Image = tauste; 
    4947        //Level.Background.TileToLevel(); 
    5048 
     49        
     50        //Camera.Follow(pallo); 
     51        Camera.StopFollowing(); 
     52         
     53        Ohjaimet(); 
     54        LuoSlider(); 
     55        LuoKauppa(); 
     56        Grafiikat(); 
     57 
     58 
     59        ColorTileMap ruudut = ColorTileMap.FromLevelAsset("kentta1"); 
     60 
     61        //2. Kerrotaan mitä aliohjelmaa kutsutaan, kun tietyn värinen pikseli tulee vastaan kuvatiedostossa. 
     62        ruudut.SetTileMethod(Color.Red, LuoPallo); 
     63        //ruudut.SetTileMethod(, LuoTaso); 
     64        ruudut.SetTileMethod(new Color(255, 14, 255), LuoTahti); 
     65        ruudut.SetTileMethod(new Color(0, 255, 0), LuoMaali ); 
     66 
     67        //3. Execute luo kentän 
     68        //   Parametreina leveys ja korkeus 
     69        ruudut.Execute(5, 5); 
     70 
     71        Level.Width = 1000; 
     72        Level.Height = 1000; 
    5173        GameObject tausta = new GameObject(Level.Width, Level.Height); 
    5274        tausta.Image = tauste; 
    5375        tausta.TextureWrapSize = new Vector(300, 300); 
    5476        Add(tausta, -3); 
    55         //Camera.Follow(pallo); 
    56         Camera.StopFollowing(); 
    57          
    58         Ohjaimet(); 
    59         LuoSlider(); 
    60         LuoKauppa(); 
    61         Grafiikat(); 
    62  
    63  
    64         ColorTileMap ruudut = ColorTileMap.FromLevelAsset("kentta1"); 
    65  
    66         //2. Kerrotaan mitä aliohjelmaa kutsutaan, kun tietyn värinen pikseli tulee vastaan kuvatiedostossa. 
    67        /* ruudut.SetTileMethod(Color.Green, ); 
    68         ruudut.SetTileMethod(Color.Black, LuoTaso); 
    69         ruudut.SetTileMethod(Color.Yellow, LuoTahti); 
    70  
    71         //3. Execute luo kentän 
    72         //   Parametreina leveys ja korkeus 
    73         ruudut.Execute(20, 20);*/ 
     77        Level.CreateBorders(); 
     78         
    7479    } 
    7580 
     
    215220        } 
    216221    } 
    217     void Palikka() 
     222    void LuoMaali(Vector paikka, double leveys, double korkeus) 
    218223    { 
    219224        
    220225 
    221         maali = PhysicsObject.CreateStaticObject(70, 70); 
     226        maali = PhysicsObject.CreateStaticObject(leveys*2, korkeus*2); 
    222227        maali.Tag = "maali"; 
    223228        maali.Image = Maali; 
    224         maali.X = 700; 
    225         maali.Y = -400; 
     229        maali.Position = paikka; 
    226230 
    227231        Add(maali); 
    228  
    229  
    230  
    231     } 
    232     void LuoPallo(Vector paikka double leveys, double korkeus) 
     232 } 
     233    void LuoPallo(Vector paikka, double leveys, double korkeus) 
    233234{ 
    234      pallo = new PhysicsObject(25.0, 25.0); 
     235     pallo = new PhysicsObject(leveys, korkeus); 
    235236        pallo.Shape = Shape.Circle; 
    236237        pallo.Color = Color.Red; 
    237238        pallo.IgnoresPhysicsLogics = true; 
    238239        Add(pallo); 
     240        pallo.Position = paikka; 
    239241        AddCollisionHandler(pallo, "maali", Voitto); 
    240242        AddCollisionHandler(pallo, "tahti", Kerays); 
     
    242244        Add(pallo); 
    243245} 
    244     void LuoTahti(Vector paikka, double leveys, double ko) 
    245     { 
    246         PhysicsObject tahti = PhysicsObject.CreateStaticObject(25, 25); 
     246    void LuoTahti(Vector paikka, double leveys, double korkeus) 
     247    { 
     248        PhysicsObject tahti = PhysicsObject.CreateStaticObject(leveys, korkeus); 
    247249        tahti.Shape = Shape.Star; 
    248250        tahti.Color = Color.HotPink; 
    249251        tahti.Tag = "tahti"; 
    250         tahti.X = 100; 
     252        tahti.Position = paikka; 
    251253 
    252254        Add(tahti); 
  • 2016/24/JustusL/Object_Ball/Object_Ball/Object_Ball/obj/x86/Debug/ContentPipeline-{CD347656-A8F2-48EE-8097-A4F9AF1242F0}.xml

    r7821 r7851  
    88      <Processor>TextureProcessor</Processor> 
    99      <Options>None</Options> 
    10       <Output>C:\Users\Justus\Documents\JustusL\Object_Ball\Object_Ball\Object_Ball\bin\x86\Debug\Content\kaarikakka.xnb</Output> 
    11       <Time>2016-07-05T15:14:08.1334008+03:00</Time> 
     10      <Output>C:\MyTemp\JustusL\Object_Ball\Object_Ball\Object_Ball\bin\x86\Debug\Content\kaarikakka.xnb</Output> 
     11      <Time>2016-07-05T10:37:41.3098919+03:00</Time> 
    1212    </Item> 
    1313    <Item> 
     
    1717      <Processor>TextureProcessor</Processor> 
    1818      <Options>None</Options> 
    19       <Output>C:\Users\Justus\Documents\JustusL\Object_Ball\Object_Ball\Object_Ball\bin\x86\Debug\Content\kaariosa.xnb</Output> 
    20       <Time>2016-06-16T12:22:54.0854567+03:00</Time> 
     19      <Output>C:\MyTemp\JustusL\Object_Ball\Object_Ball\Object_Ball\bin\x86\Debug\Content\kaariosa.xnb</Output> 
     20      <Time>2016-07-04T10:29:37.230784+03:00</Time> 
    2121    </Item> 
    2222    <Item> 
     
    2626      <Processor>TextureProcessor</Processor> 
    2727      <Options>None</Options> 
    28       <Output>C:\Users\Justus\Documents\JustusL\Object_Ball\Object_Ball\Object_Ball\bin\x86\Debug\Content\kyna.xnb</Output> 
    29       <Time>2016-06-16T12:22:55.824712+03:00</Time> 
     28      <Output>C:\MyTemp\JustusL\Object_Ball\Object_Ball\Object_Ball\bin\x86\Debug\Content\kyna.xnb</Output> 
     29      <Time>2016-07-04T10:29:37.090384+03:00</Time> 
    3030    </Item> 
    3131    <Item> 
     
    3535      <Processor>TextureProcessor</Processor> 
    3636      <Options>None</Options> 
    37       <Output>C:\Users\Justus\Documents\JustusL\Object_Ball\Object_Ball\Object_Ball\bin\x86\Debug\Content\maali_objectBall.xnb</Output> 
    38       <Time>2016-06-16T11:35:20.5217772+03:00</Time> 
     37      <Output>C:\MyTemp\JustusL\Object_Ball\Object_Ball\Object_Ball\bin\x86\Debug\Content\maali_objectBall.xnb</Output> 
     38      <Time>2016-07-04T10:29:37.090384+03:00</Time> 
    3939    </Item> 
    4040    <Item> 
     
    4444      <Processor>TextureProcessor</Processor> 
    4545      <Options>None</Options> 
    46       <Output>C:\Users\Justus\Documents\JustusL\Object_Ball\Object_Ball\Object_Ball\bin\x86\Debug\Content\palikka kursori.xnb</Output> 
    47       <Time>2016-06-16T11:35:20.5287781+03:00</Time> 
     46      <Output>C:\MyTemp\JustusL\Object_Ball\Object_Ball\Object_Ball\bin\x86\Debug\Content\palikka kursori.xnb</Output> 
     47      <Time>2016-07-04T10:29:37.230784+03:00</Time> 
    4848    </Item> 
    4949    <Item> 
     
    5353      <Processor>TextureProcessor</Processor> 
    5454      <Options>None</Options> 
    55       <Output>C:\Users\Justus\Documents\JustusL\Object_Ball\Object_Ball\Object_Ball\bin\x86\Debug\Content\palikka.xnb</Output> 
    56       <Time>2016-06-16T12:22:56.4812302+03:00</Time> 
     55      <Output>C:\MyTemp\JustusL\Object_Ball\Object_Ball\Object_Ball\bin\x86\Debug\Content\palikka.xnb</Output> 
     56      <Time>2016-07-04T10:29:37.090384+03:00</Time> 
    5757    </Item> 
    5858    <Item> 
     
    6262      <Processor>TextureProcessor</Processor> 
    6363      <Options>None</Options> 
    64       <Output>C:\Users\Justus\Documents\JustusL\Object_Ball\Object_Ball\Object_Ball\bin\x86\Debug\Content\ruutu.xnb</Output> 
    65       <Time>2016-07-04T20:43:40.1219171+03:00</Time> 
     64      <Output>C:\MyTemp\JustusL\Object_Ball\Object_Ball\Object_Ball\bin\x86\Debug\Content\ruutu.xnb</Output> 
     65      <Time>2016-07-04T13:04:34.8082709+03:00</Time> 
    6666    </Item> 
    6767    <Item> 
     
    7171      <Processor>TextureProcessor</Processor> 
    7272      <Options>None</Options> 
    73       <Output>C:\Users\Justus\Documents\JustusL\Object_Ball\Object_Ball\Object_Ball\bin\x86\Debug\Content\kentta1.xnb</Output> 
    74       <Time>2016-07-04T20:43:40.1929412+03:00</Time> 
     73      <Output>C:\MyTemp\JustusL\Object_Ball\Object_Ball\Object_Ball\bin\x86\Debug\Content\kentta1.xnb</Output> 
     74      <Time>2016-07-06T10:37:01.9231134+03:00</Time> 
    7575    </Item> 
    7676    <Item> 
     
    8080      <Processor>TextureProcessor</Processor> 
    8181      <Options>None</Options> 
    82       <Output>C:\Users\Justus\Documents\JustusL\Object_Ball\Object_Ball\Object_Ball\bin\x86\Debug\Content\kentta2.xnb</Output> 
    83       <Time>2016-07-04T20:43:40.2029413+03:00</Time> 
     82      <Output>C:\MyTemp\JustusL\Object_Ball\Object_Ball\Object_Ball\bin\x86\Debug\Content\kentta2.xnb</Output> 
     83      <Time>2016-07-04T14:53:50.6394709+03:00</Time> 
    8484    </Item> 
    8585    <BuildSuccessful>true</BuildSuccessful> 
     
    9090      <BuildConfiguration>Debug</BuildConfiguration> 
    9191      <CompressContent>false</CompressContent> 
    92       <RootDirectory>C:\Users\Justus\Documents\JustusL\Object_Ball\Object_Ball\Object_BallContent\</RootDirectory> 
    93       <LoggerRootDirectory>C:\Users\Justus\Documents\JustusL\Object_Ball\Object_Ball\Object_Ball\</LoggerRootDirectory> 
    94       <IntermediateDirectory>C:\Users\Justus\Documents\JustusL\Object_Ball\Object_Ball\Object_Ball\obj\x86\Debug\</IntermediateDirectory> 
    95       <OutputDirectory>C:\Users\Justus\Documents\JustusL\Object_Ball\Object_Ball\Object_Ball\bin\x86\Debug\Content\</OutputDirectory> 
     92      <RootDirectory>C:\MyTemp\JustusL\Object_Ball\Object_Ball\Object_BallContent\</RootDirectory> 
     93      <LoggerRootDirectory>C:\MyTemp\JustusL\Object_Ball\Object_Ball\Object_Ball\</LoggerRootDirectory> 
     94      <IntermediateDirectory>C:\MyTemp\JustusL\Object_Ball\Object_Ball\Object_Ball\obj\x86\Debug\</IntermediateDirectory> 
     95      <OutputDirectory>C:\MyTemp\JustusL\Object_Ball\Object_Ball\Object_Ball\bin\x86\Debug\Content\</OutputDirectory> 
    9696    </Settings> 
    9797    <Assemblies> 
    9898      <Assembly> 
    99         <Key>C:\Users\Justus\Jypeli\lib\ContentExtensions\TextFileContentExtension.dll</Key> 
    100         <Value>2015-04-01T18:41:16+03:00</Value> 
     99        <Key>C:\Program Files (x86)\Jypeli\lib\ContentExtensions\TextFileContentExtension.dll</Key> 
     100        <Value>2015-02-09T20:18:44+02:00</Value> 
    101101      </Assembly> 
    102102      <Assembly> 
     
    125125      </Assembly> 
    126126      <Assembly> 
    127         <Key>C:\Users\Justus\Jypeli\lib\ContentExtensions\AnimationExtension.dll</Key> 
    128         <Value>2015-04-01T18:41:16+03:00</Value> 
     127        <Key>C:\Program Files (x86)\Jypeli\lib\ContentExtensions\AnimationExtension.dll</Key> 
     128        <Value>2015-02-17T22:27:18+02:00</Value> 
    129129      </Assembly> 
    130130      <Assembly> 
    131         <Key>C:\WINDOWS\Microsoft.Net\assembly\GAC_32\Microsoft.Xna.Framework.Content.Pipeline\v4.0_4.0.0.0__842cf8be1de50553\Microsoft.Xna.Framework.Content.Pipeline.dll</Key> 
    132         <Value>2015-12-15T06:54:21.9346879+02:00</Value> 
     131        <Key>C:\Windows\Microsoft.Net\assembly\GAC_32\Microsoft.Xna.Framework.Content.Pipeline\v4.0_4.0.0.0__842cf8be1de50553\Microsoft.Xna.Framework.Content.Pipeline.dll</Key> 
     132        <Value>2015-09-16T19:42:13.6500946+03:00</Value> 
    133133      </Assembly> 
    134134    </Assemblies> 
Note: See TracChangeset for help on using the changeset viewer.