-
-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #10 from BigBang1112/netstandard2.0
GBX.NET 0.2.0
- Loading branch information
Showing
105 changed files
with
4,351 additions
and
4,345 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,60 +1,50 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Text; | ||
|
||
namespace GBX.NET.Engines.Game | ||
{ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Text; | ||
|
||
namespace GBX.NET.Engines.Game | ||
{ | ||
/// <summary> | ||
/// Block on a map (0x03057000) | ||
/// </summary> | ||
/// <remarks>A block placed on a map.</remarks> | ||
[Node(0x03057000)] | ||
public class CGameCtnBlock : Node | ||
{ | ||
public Meta BlockInfo { get; set; } | ||
|
||
public Direction? Direction { get; set; } | ||
|
||
public Byte3? Coord { get; set; } | ||
|
||
public int? Flags { get; set; } | ||
|
||
public CGameCtnBlock(ILookbackable lookbackable, uint classID) : base(lookbackable, classID) | ||
{ | ||
|
||
} | ||
|
||
public CGameCtnBlock(ILookbackable lookbackable) : base(lookbackable, 0x03057000) | ||
{ | ||
|
||
} | ||
|
||
public override string ToString() | ||
{ | ||
return $"{BlockInfo?.ID} {Coord}"; | ||
/// </summary> | ||
/// <remarks>A block placed on a map.</remarks> | ||
[Node(0x03057000)] | ||
public class CGameCtnBlock : Node | ||
{ | ||
public Meta BlockInfo { get; set; } | ||
|
||
public Direction? Direction { get; set; } | ||
|
||
public Byte3? Coord { get; set; } | ||
|
||
public int? Flags { get; set; } | ||
|
||
public override string ToString() | ||
{ | ||
return $"{BlockInfo?.ID} {Coord}"; | ||
} | ||
|
||
#region Chunks | ||
#region Chunks | ||
|
||
#region 0x002 chunk | ||
|
||
/// <summary> | ||
/// CGameCtnBlock 0x002 chunk | ||
/// </summary> | ||
[Chunk(0x03057002)] | ||
public class Chunk03057002 : Chunk<CGameCtnBlock> | ||
{ | ||
public override void ReadWrite(CGameCtnBlock n, GameBoxReaderWriter rw) | ||
{ | ||
n.BlockInfo = rw.Meta(n.BlockInfo); | ||
n.Direction = (Direction)rw.Byte((byte)n.Direction.GetValueOrDefault()); | ||
n.Coord = rw.Byte3(n.Coord.GetValueOrDefault()); | ||
n.Flags = rw.Int32(n.Flags.GetValueOrDefault()); | ||
} | ||
[Chunk(0x03057002)] | ||
public class Chunk03057002 : Chunk<CGameCtnBlock> | ||
{ | ||
public override void ReadWrite(CGameCtnBlock n, GameBoxReaderWriter rw) | ||
{ | ||
n.BlockInfo = rw.Meta(n.BlockInfo); | ||
n.Direction = (Direction)rw.Byte((byte)n.Direction.GetValueOrDefault()); | ||
n.Coord = rw.Byte3(n.Coord.GetValueOrDefault()); | ||
n.Flags = rw.Int32(n.Flags.GetValueOrDefault()); | ||
} | ||
} | ||
|
||
#endregion | ||
|
||
#endregion | ||
} | ||
} | ||
#endregion | ||
} | ||
} |
Oops, something went wrong.