Changeset 7945


Ignore:
Timestamp:
2016-07-07 13:04:37 (3 years ago)
Author:
otosjahn
Message:
 
Location:
2016/27/RuhanAnjanK
Files:
26 added
13 edited

Legend:

Unmodified
Added
Removed
  • 2016/27/RuhanAnjanK/Noname/Noname/Noname/Noname.cs

    r7903 r7945  
    1515    PhysicsObject player1; 
    1616    Image playerimage = LoadImage("boy3"); 
    17     Image appleimage = LoadImage("appleimage"); 
     17    Image appleimage = LoadImage("appleimage4"); 
    1818    Image treeimage = LoadImage("tree2"); 
     19    Image grassimage = LoadImage("grass2"); 
    1920 
    2021    SoundEffect collectsound = LoadSoundEffect("maali"); 
     
    4142        level.SetTileMethod('^', AddWall); 
    4243        level.SetTileMethod('%', AddTree); 
     44        level.SetTileMethod('&', AddBarrier); 
     45        level.SetTileMethod('D', AddGrass); 
    4346        level.Execute(TILE_SIZE, TILE_SIZE); 
    4447 
    4548        Level.CreateBorders(); 
    46         Level.Background.CreateGradient(Color.White, Color.SkyBlue); 
     49        Level.Background.CreateGradient(Color.Brown, Color.Brown); 
    4750    } 
    4851 
     
    5558    } 
    5659 
     60    void AddGrass(Vector place, double width, double hieght) 
     61    { 
     62        GameObject grass = new GameObject(width, hieght); 
     63        grass.Position = place; 
     64        grass.Image = grassimage; 
     65        grass.Tag = grass; 
     66        grass.Color = Color.Green; 
     67        Add(grass); 
     68 
     69    } 
     70 
     71    void AddBarrier(Vector place, double width, double hieght) 
     72    { 
     73        GameObject barrier = new GameObject(width, hieght); 
     74        barrier.Position = place; 
     75        barrier.Color = Color.Black; 
     76        Add(barrier); 
     77 
     78    } 
     79 
    5780    void AddTree(Vector place, double width, double hieght) 
    5881    { 
     
    6285        tree.Tag = tree; 
    6386        tree.Color = Color.Green; 
     87        tree.Restitution = 0.0; 
    6488        Add(tree); 
    6589    } 
     
    7195        wall.Position = place; 
    7296        wall.Color = Color.Black; 
     97        wall.Restitution = 0.0; 
     98        wall.CollisionIgnoreGroup = 5; 
    7399        Add(wall); 
    74100    } 
     
    79105        river.Color = Color.MediumBlue; 
    80106        river.Position = place; 
     107        river.Restitution = 0.0; 
    81108        Add(river); 
    82109    } 
     
    98125        player1.Image = playerimage; 
    99126        AddCollisionHandler(player1, "apple", HitApple); 
     127        player1.CollisionIgnoreGroup = 5; 
    100128        Add(player1); 
    101129        player1.CanRotate = false; 
     
    117145        /*ControllerOne.Listen(Button.Back, ButtonState.Pressed, Exit, "exit game"); 
    118146 
    119          //ControllerOne.Listen(Button.DPadLeft, ButtonState.Down, move, "player moves left", player1, -speed); 
     147         ControllerOne.Listen(Button.DPadLeft, ButtonState.Down, move, "player moves left", player1, -speed); 
    120148         ControllerOne.Listen(Button.DPadRight, ButtonState.Down, move, "player moves right", player1, speed); 
    121149         ControllerOne.Listen(Button.A, ButtonState.Pressed, Jump, "player jumps", player1, jumpspeed); 
  • 2016/27/RuhanAnjanK/Noname/Noname/Noname/Noname.csproj.Debug.cachefile

    r7903 r7945  
    99Content\tree.xnb 
    1010Content\tree2.xnb 
     11Content\appleimage4.xnb 
     12Content\grass2.xnb 
  • 2016/27/RuhanAnjanK/Noname/Noname/Noname/obj/x86/Debug/ContentPipeline-{FB1067CC-FEED-45F1-8CB8-8F3DD59AB260}.xml

    r7903 r7945  
    3636      <Options>None</Options> 
    3737      <Output>C:\MyTemp\ruhank\Noname\Noname\Noname\bin\x86\Debug\Content\kentta1.xnb</Output> 
    38       <Time>2016-07-06T14:38:44.7425887+03:00</Time> 
     38      <Time>2016-07-07T12:20:29.7415405+03:00</Time> 
    3939    </Item> 
    4040    <Item> 
     
    9292      <Time>2016-07-06T14:24:30.6009521+03:00</Time> 
    9393    </Item> 
     94    <Item> 
     95      <Source>appleimage4.png</Source> 
     96      <Name>appleimage4</Name> 
     97      <Importer>TextureImporter</Importer> 
     98      <Processor>TextureProcessor</Processor> 
     99      <Options>None</Options> 
     100      <Output>C:\MyTemp\ruhank\Noname\Noname\Noname\bin\x86\Debug\Content\appleimage4.xnb</Output> 
     101      <Time>2016-07-07T11:05:00.1185405+03:00</Time> 
     102    </Item> 
     103    <Item> 
     104      <Source>grass2.png</Source> 
     105      <Name>grass2</Name> 
     106      <Importer>TextureImporter</Importer> 
     107      <Processor>TextureProcessor</Processor> 
     108      <Options>None</Options> 
     109      <Output>C:\MyTemp\ruhank\Noname\Noname\Noname\bin\x86\Debug\Content\grass2.xnb</Output> 
     110      <Time>2016-07-07T12:09:17.7375405+03:00</Time> 
     111    </Item> 
    94112    <BuildSuccessful>true</BuildSuccessful> 
    95113    <Settings> 
  • 2016/27/RuhanAnjanK/Noname/Noname/Noname/obj/x86/Debug/Noname.csproj.FileListAbsolute.txt

    r7903 r7945  
    1717C:\MyTemp\ruhank\Noname\Noname\Noname\bin\x86\Debug\Content\tree.xnb 
    1818C:\MyTemp\ruhank\Noname\Noname\Noname\bin\x86\Debug\Content\tree2.xnb 
     19C:\MyTemp\ruhank\Noname\Noname\Noname\bin\x86\Debug\Content\appleimage4.xnb 
     20C:\MyTemp\ruhank\Noname\Noname\Noname\bin\x86\Debug\Content\grass2.xnb 
  • 2016/27/RuhanAnjanK/Noname/Noname/Noname/obj/x86/Debug/cachefile-{FB1067CC-FEED-45F1-8CB8-8F3DD59AB260}-targetpath.txt

    r7903 r7945  
    99Content\tree.xnb 
    1010Content\tree2.xnb 
     11Content\appleimage4.xnb 
     12Content\grass2.xnb 
  • 2016/27/RuhanAnjanK/Noname/Noname/NonameContent/NonameContent.contentproj

    r7903 r7945  
    109109    </Compile> 
    110110  </ItemGroup> 
     111  <ItemGroup> 
     112    <Compile Include="appleimage4.png"> 
     113      <Name>appleimage4</Name> 
     114      <Importer>TextureImporter</Importer> 
     115      <Processor>TextureProcessor</Processor> 
     116    </Compile> 
     117  </ItemGroup> 
     118  <ItemGroup> 
     119    <Compile Include="grass2.png"> 
     120      <Name>grass2</Name> 
     121      <Importer>TextureImporter</Importer> 
     122      <Processor>TextureProcessor</Processor> 
     123    </Compile> 
     124  </ItemGroup> 
    111125  <Import Project="$(MSBuildExtensionsPath)\Microsoft\XNA Game Studio\$(XnaFrameworkVersion)\Microsoft.Xna.GameStudio.ContentPipeline.targets" /> 
    112126  <!--  To modify your build process, add your task inside one of the targets below and uncomment it.  
  • 2016/27/RuhanAnjanK/Noname/Noname/NonameContent/kentta1.txt

    r7903 r7945  
    11          
    22         
    3         ######N###### 
     3        ############ 
    44        ############# 
    55        ############# 
    66        ############# 
    77 
    8  
    9  
     8        DDDDDDDDNDDDDD 
     9         
    1010                        # 
    1111 
     
    1616 ##  ##  ##  ##  ## 
    1717 
    18        
     18   
    1919!!!!!!!!!!!!!!!!!!!!! 
Note: See TracChangeset for help on using the changeset viewer.