Changeset 6708 for 2015/27


Ignore:
Timestamp:
2015-07-01 21:47:22 (8 years ago)
Author:
empaheik
Message:

Aita, jonka voi tuhota luodeilla, muttei miekalla. Hmm. Kyllä se tästä.

Location:
2015/27/ohjaajat/TheLegendOfGabriel/TheLegendOfGabriel
Files:
1 added
5 edited

Legend:

Unmodified
Added
Removed
  • 2015/27/ohjaajat/TheLegendOfGabriel/TheLegendOfGabriel/TheLegendOfGabriel/LevelCreation.cs

    r6707 r6708  
    279279        Add(exit); 
    280280        exits.Add(exit); 
     281 
     282        bool create = properties.ContainsKey("block"); 
     283        if(create) 
     284        { 
     285            PhysicsObject fence = PhysicsObject.CreateStaticObject(TILE_SIZE, TILE_SIZE); 
     286            fence.Image = FenceImage; 
     287            fence.Position = exit.Position - new Vector(0, TILE_SIZE); 
     288            Add(fence, 3); 
     289 
     290            AddCollisionHandler(fence, "playerattack", delegate(PhysicsObject destroyable, PhysicsObject a) 
     291            { 
     292               destroyable.Destroy(); 
     293            }); 
     294         
     295        } 
    281296    } 
    282297} 
  • 2015/27/ohjaajat/TheLegendOfGabriel/TheLegendOfGabriel/TheLegendOfGabriel/TheLegendOfGabriel.cs

    r6707 r6708  
    9393    public static Image BulletImage = LoadImage("bullet"); 
    9494    public static Image LetterImage = LoadImage("letter"); 
     95    public static Image FenceImage = LoadImage("fence"); 
    9596    public static Image FoodImage = LoadImage("food"); 
    9697    public static Image SmallSwordImage = LoadImage("smallsword"); 
  • 2015/27/ohjaajat/TheLegendOfGabriel/TheLegendOfGabriel/TheLegendOfGabrielContent/LegendOfGabrielTileset.tsx

    r6706 r6708  
    1212  </properties> 
    1313 </tile> 
    14  <tile id="22"> 
    15   <properties> 
    16    <property name="collide" value="true"/> 
    17   </properties> 
    18  </tile> 
    19  <tile id="23"> 
    20   <properties> 
    21    <property name="collide" value="true"/> 
    22   </properties> 
    23  </tile> 
    24  <tile id="24"> 
    25   <properties> 
    26    <property name="collide" value="true"/> 
    27   </properties> 
    28  </tile> 
    2914</tileset> 
  • 2015/27/ohjaajat/TheLegendOfGabriel/TheLegendOfGabriel/TheLegendOfGabrielContent/TheLegendOfGabrielContent.contentproj

    r6707 r6708  
    353353    </Compile> 
    354354  </ItemGroup> 
     355  <ItemGroup> 
     356    <Compile Include="fence.png"> 
     357      <Name>fence</Name> 
     358      <Importer>TextureImporter</Importer> 
     359      <Processor>TextureProcessor</Processor> 
     360    </Compile> 
     361  </ItemGroup> 
    355362  <Import Project="$(MSBuildExtensionsPath)\Microsoft\XNA Game Studio\$(XnaFrameworkVersion)\Microsoft.Xna.GameStudio.ContentPipeline.targets" /> 
    356363  <!--  To modify your build process, add your task inside one of the targets below and uncomment it.  
  • 2015/27/ohjaajat/TheLegendOfGabriel/TheLegendOfGabriel/TheLegendOfGabrielContent/level1.tmx

    r6706 r6708  
    11<?xml version="1.0" encoding="UTF-8"?> 
    2 <map version="1.0" orientation="orthogonal" renderorder="right-down" width="25" height="40" tilewidth="20" tileheight="20" nextobjectid="42"> 
    3  <tileset firstgid="1" source="LegendOfGabrielTileset.tsx"/> 
     2<map version="1.0" orientation="orthogonal" renderorder="right-down" width="25" height="40" tilewidth="20" tileheight="20" nextobjectid="45"> 
     3 <tileset firstgid="1" name="LegendOfGabrielTileset" tilewidth="20" tileheight="20"> 
     4  <image source="tileset.png" width="200" height="200"/> 
     5  <tile id="2"> 
     6   <properties> 
     7    <property name="collide" value="true"/> 
     8   </properties> 
     9  </tile> 
     10  <tile id="16"> 
     11   <properties> 
     12    <property name="collide" value="true"/> 
     13   </properties> 
     14  </tile> 
     15 </tileset> 
    416 <layer name="base" width="25" height="40"> 
    517  <data encoding="base64" compression="zlib"> 
    6    eJztkzEOgDAIRYlDnRy4mvc/TGPiQBqkjfIxIQxvEv5LAZmIWLALGMSVfQpHE6z0a3Vt4BCM3yzXU63GiuMrEY6iKPKw3aDzUQ50frY3oPL/2kfETtBzy+Co/3B+Q4ib0jIjHJ4zf+uY1XvM3urz2q3V7zX7yBuMdkS8wcOFdnQ/9xfU 
     18   eJztkzEOgDAIRYlDnRy4gfc/ZWPiQBqkjfIxIQxvEv5LAZmIWLALGMSVfQpHE6z0a3Vt4BCM3yzXU63GiuMrEY6iKPKw3aDzUQ50frY3oPL/2kfETtBzy+Co/3B+Q4ib0jIjHJ4zf+uY1XvM3urz2q3V7zX7yBuMdkS8wcOFdnRJ+hei 
    719  </data> 
    820 </layer> 
     
    1830  <object id="19" name="tunnelblockade" x="100" y="0" width="20" height="20"> 
    1931   <properties> 
     32    <property name="block" value="below"/> 
    2033    <property name="goto" value="level2@bottom"/> 
    2134   </properties> 
Note: See TracChangeset for help on using the changeset viewer.