Skip to content

Commit

Permalink
[164] Texturen nach Block Orientierung & Orientierung speichern
Browse files Browse the repository at this point in the history
  • Loading branch information
tomwendel_cp committed Jun 2, 2015
1 parent b0ecb35 commit d479839
Show file tree
Hide file tree
Showing 30 changed files with 704 additions and 270 deletions.
10 changes: 0 additions & 10 deletions OctoAwesome/OctoAwesome.Basics/GrassBlock.cs
Expand Up @@ -8,15 +8,5 @@ namespace OctoAwesome.Basics
{
public class GrassBlock : Block
{
public GrassBlock()
{
TopTexture = 0;
BottomTexture = 1;

NorthTexture = 2;
SouthTexture = 2;
WestTexture = 2;
EastTexture = 2;
}
}
}
78 changes: 62 additions & 16 deletions OctoAwesome/OctoAwesome.Basics/GrassBlockDefinition.cs
Expand Up @@ -26,22 +26,7 @@ public IEnumerable<Bitmap> Textures
}
}

//public Bitmap TopTexture
//{
// get { return Resources.grass_top; }
//}

//public Bitmap BottomTexture
//{
// get { return Resources.grass_bottom; }
//}

//public Bitmap SideTexture
//{
// get { return Resources.grass_side; }
//}

public IBlock GetInstance()
public IBlock GetInstance(OrientationFlags orientation)
{
return new GrassBlock();
}
Expand All @@ -50,5 +35,66 @@ public Type GetBlockType()
{
return typeof(GrassBlock);
}


public int GetTopTextureIndex(IBlock block)
{
return 0;
}

public int GetBottomTextureIndex(IBlock block)
{
return 1;
}

public int GetNorthTextureIndex(IBlock block)
{
return 2;
}

public int GetSouthTextureIndex(IBlock block)
{
return 2;
}

public int GetWestTextureIndex(IBlock block)
{
return 2;
}

public int GetEastTextureIndex(IBlock block)
{
return 2;
}

public int GetTopTextureRotation(IBlock block)
{
return 0;
}

public int GetBottomTextureRotation(IBlock block)
{
return 0;
}

public int GetEastTextureRotation(IBlock block)
{
return 0;
}

public int GetWestTextureRotation(IBlock block)
{
return 0;
}

public int GetNorthTextureRotation(IBlock block)
{
return 0;
}

public int GetSouthTextureRotation(IBlock block)
{
return 0;
}
}
}
72 changes: 58 additions & 14 deletions OctoAwesome/OctoAwesome.Basics/GroundBlockDefinition.cs
Expand Up @@ -19,27 +19,71 @@ public IEnumerable<Bitmap> Textures
get
{
return new[] {
Resources.ground_top
Resources.ground_bottom
};
}
}

//public Bitmap TopTexture
//{
// get { return Resources.ground_top; }
//}
public int GetTopTextureIndex(IBlock block)
{
return 0;
}

public int GetBottomTextureIndex(IBlock block)
{
return 0;
}

public int GetNorthTextureIndex(IBlock block)
{
return 0;
}

public int GetSouthTextureIndex(IBlock block)
{
return 0;
}

public int GetWestTextureIndex(IBlock block)
{
return 0;
}

public int GetEastTextureIndex(IBlock block)
{
return 0;
}

public int GetTopTextureRotation(IBlock block)
{
return 0;
}

public int GetBottomTextureRotation(IBlock block)
{
return 0;
}

public int GetEastTextureRotation(IBlock block)
{
return 0;
}

//public Bitmap BottomTexture
//{
// get { return Resources.ground_bottom; }
//}
public int GetWestTextureRotation(IBlock block)
{
return 0;
}

//public Bitmap SideTexture
//{
// get { return Resources.ground_side; }
//}
public int GetNorthTextureRotation(IBlock block)
{
return 0;
}

public IBlock GetInstance()
public int GetSouthTextureRotation(IBlock block)
{
return 0;
}
public IBlock GetInstance(OrientationFlags orientation)
{
return new GroundBlock();
}
Expand Down
22 changes: 6 additions & 16 deletions OctoAwesome/OctoAwesome.Basics/OctoAwesome.Basics.csproj
Expand Up @@ -72,6 +72,8 @@
<Compile Include="StoneBlockDefinition.cs" />
<Compile Include="WaterBlock.cs" />
<Compile Include="WaterBlockDefinition.cs" />
<Compile Include="WoodBlock.cs" />
<Compile Include="WoodBlockDefinition.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\OctoAwesome\OctoAwesome.csproj">
Expand All @@ -98,38 +100,26 @@
<ItemGroup>
<None Include="Resources\ground_bottom.png" />
</ItemGroup>
<ItemGroup>
<None Include="Resources\ground_side.png" />
</ItemGroup>
<ItemGroup>
<None Include="Resources\ground_top.png" />
</ItemGroup>
<ItemGroup>
<None Include="Resources\sand_bottom.png" />
</ItemGroup>
<ItemGroup>
<None Include="Resources\sand_side.png" />
</ItemGroup>
<ItemGroup>
<None Include="Resources\sand_top.png" />
</ItemGroup>
<ItemGroup>
<None Include="Resources\stone_bottom.png" />
</ItemGroup>
<ItemGroup>
<None Include="Resources\stone_side.png" />
</ItemGroup>
<ItemGroup>
<None Include="Resources\stone_top.png" />
</ItemGroup>
<ItemGroup>
<None Include="Resources\water_bottom.png" />
</ItemGroup>
<ItemGroup>
<None Include="Resources\water_side.png" />
</ItemGroup>
<ItemGroup>
<None Include="Resources\water_top.png" />
<None Include="Resources\wood_bottom.png" />
</ItemGroup>
<ItemGroup>
<None Include="Resources\wood_side.png" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Expand Down
56 changes: 8 additions & 48 deletions OctoAwesome/OctoAwesome.Basics/Properties/Resources.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 5 additions & 17 deletions OctoAwesome/OctoAwesome.Basics/Properties/Resources.resx
Expand Up @@ -130,37 +130,25 @@
<data name="ground_bottom" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\ground_bottom.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="ground_side" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\ground_side.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="ground_top" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\ground_top.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="sand_bottom" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\sand_bottom.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="sand_side" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\sand_side.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="sand_top" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\sand_top.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="stone_bottom" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\stone_bottom.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="stone_side" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\stone_side.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="stone_top" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\stone_top.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="water_bottom" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\water_bottom.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="water_side" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\water_side.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="water_top" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\water_top.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
<data name="wood_bottom" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\wood_bottom.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="wood_side" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\wood_side.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
</root>
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed OctoAwesome/OctoAwesome.Basics/Resources/stone_top.png
Binary file not shown.
Binary file not shown.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit d479839

Please sign in to comment.