From ced3d03bdb3ce866d832e03fb212865140905a9a Mon Sep 17 00:00:00 2001 From: Thomas Leyh Date: Sun, 24 Jul 2016 08:14:18 +0200 Subject: Add project files. --- V3/Data/GameState.cs | 64 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 V3/Data/GameState.cs (limited to 'V3/Data/GameState.cs') diff --git a/V3/Data/GameState.cs b/V3/Data/GameState.cs new file mode 100644 index 0000000..b38ec46 --- /dev/null +++ b/V3/Data/GameState.cs @@ -0,0 +1,64 @@ +using Microsoft.Xna.Framework; +using System; +using System.Collections.Generic; +using V3.AI; +using V3.Objects; + +namespace V3.Data +{ + /// + /// Stores the current state of the game (the data that must be stored in + /// a save game). All members should be public and serializable. + /// + [Serializable] + public sealed class GameState + { + public List mCreatures = new List(); + public List mFog = new List(); + public Vector2 mCameraPosition; + public AiState mAiState = AiState.Idle; + } + + public enum CreatureType + { + FemalePeasant, + King, + KingsGuard, + Knight, + MalePeasant, + Meatball, + Necromancer, + Prince, + Skeleton, + SkeletonHorse, + Zombie + } + + public sealed class CreatureData + { + public CreatureType Type { get; set; } + public int Id { get; set; } + public int Life { get; set; } + public int MaxLife { get; set; } + public int Attack { get; set; } + public TimeSpan Recovery { get; set; } + public bool IsUpgraded { get; set; } + public float PositionX { get; set; } + public float PositionY { get; set; } + public MovementDirection MovementDirection { get; set; } + public MovementState MovementState { get; set; } + public MovementData MovementData { get; set; } + public int IsAttackingId { get; set; } + public bool Mounted { get; set; } + public int SkeletonId { get; set; } + // IsAttackingBuilding + } + + public sealed class MovementData + { + public List Path { get; set; } + public int Step { get; set; } + public Vector2 LastMovement { get; set; } + public bool IsMoving { get; set; } + } +} -- cgit v1.2.1