-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Witold Ksiazek
authored and
Witold Ksiazek
committed
Jan 21, 2020
1 parent
04ece8b
commit 9b00b72
Showing
73 changed files
with
23,500 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<Weavers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="FodyWeavers.xsd"> | ||
<PropertyChanged /> | ||
</Weavers> |
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 |
---|---|---|
@@ -0,0 +1,54 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"> | ||
<!-- This file was generated by Fody. Manual changes to this file will be lost when your project is rebuilt. --> | ||
<xs:element name="Weavers"> | ||
<xs:complexType> | ||
<xs:all> | ||
<xs:element name="PropertyChanged" minOccurs="0" maxOccurs="1"> | ||
<xs:complexType> | ||
<xs:attribute name="InjectOnPropertyNameChanged" type="xs:boolean"> | ||
<xs:annotation> | ||
<xs:documentation>Used to control if the On_PropertyName_Changed feature is enabled.</xs:documentation> | ||
</xs:annotation> | ||
</xs:attribute> | ||
<xs:attribute name="EventInvokerNames" type="xs:string"> | ||
<xs:annotation> | ||
<xs:documentation>Used to change the name of the method that fires the notify event. This is a string that accepts multiple values in a comma separated form.</xs:documentation> | ||
</xs:annotation> | ||
</xs:attribute> | ||
<xs:attribute name="CheckForEquality" type="xs:boolean"> | ||
<xs:annotation> | ||
<xs:documentation>Used to control if equality checks should be inserted. If false, equality checking will be disabled for the project.</xs:documentation> | ||
</xs:annotation> | ||
</xs:attribute> | ||
<xs:attribute name="CheckForEqualityUsingBaseEquals" type="xs:boolean"> | ||
<xs:annotation> | ||
<xs:documentation>Used to control if equality checks should use the Equals method resolved from the base class.</xs:documentation> | ||
</xs:annotation> | ||
</xs:attribute> | ||
<xs:attribute name="UseStaticEqualsFromBase" type="xs:boolean"> | ||
<xs:annotation> | ||
<xs:documentation>Used to control if equality checks should use the static Equals method resolved from the base class.</xs:documentation> | ||
</xs:annotation> | ||
</xs:attribute> | ||
</xs:complexType> | ||
</xs:element> | ||
</xs:all> | ||
<xs:attribute name="VerifyAssembly" type="xs:boolean"> | ||
<xs:annotation> | ||
<xs:documentation>'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed.</xs:documentation> | ||
</xs:annotation> | ||
</xs:attribute> | ||
<xs:attribute name="VerifyIgnoreCodes" type="xs:string"> | ||
<xs:annotation> | ||
<xs:documentation>A comma-separated list of error codes that can be safely ignored in assembly verification.</xs:documentation> | ||
</xs:annotation> | ||
</xs:attribute> | ||
<xs:attribute name="GenerateXsd" type="xs:boolean"> | ||
<xs:annotation> | ||
<xs:documentation>'false' to turn off automatic generation of the XML Schema file.</xs:documentation> | ||
</xs:annotation> | ||
</xs:attribute> | ||
</xs:complexType> | ||
</xs:element> | ||
</xs:schema> |
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 |
---|---|---|
@@ -0,0 +1,34 @@ | ||
[remap] | ||
|
||
importer="texture" | ||
type="StreamTexture" | ||
path="res://.import/characters_atlas.png-feda367df5706b359397f122beef8237.stex" | ||
metadata={ | ||
"vram_texture": false | ||
} | ||
|
||
[deps] | ||
|
||
source_file="res://Images/Characters/characters_atlas.png" | ||
dest_files=[ "res://.import/characters_atlas.png-feda367df5706b359397f122beef8237.stex" ] | ||
|
||
[params] | ||
|
||
compress/mode=0 | ||
compress/lossy_quality=0.7 | ||
compress/hdr_mode=0 | ||
compress/bptc_ldr=0 | ||
compress/normal_map=0 | ||
flags/repeat=0 | ||
flags/filter=true | ||
flags/mipmaps=false | ||
flags/anisotropic=false | ||
flags/srgb=2 | ||
process/fix_alpha_border=true | ||
process/premult_alpha=false | ||
process/HDR_as_SRGB=false | ||
process/invert_color=false | ||
stream=false | ||
size_limit=0 | ||
detect_3d=true | ||
svg/scale=1.0 |
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 |
---|---|---|
@@ -0,0 +1,8 @@ | ||
[gd_resource type="AtlasTexture" load_steps=2 format=2] | ||
|
||
[ext_resource path="res://Images/Characters/characters_atlas.png" type="Texture" id=1] | ||
|
||
[resource] | ||
flags = 4 | ||
atlas = ExtResource( 1 ) | ||
region = Rect2( 0, 0, 32, 40 ) |
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 |
---|---|---|
@@ -0,0 +1,21 @@ | ||
[gd_resource type="TileSet" load_steps=2 format=2] | ||
|
||
[ext_resource path="res://Images/Grounds/ground_tiles.png" type="Texture" id=1] | ||
|
||
[resource] | ||
0/name = "ground_tiles.png 0" | ||
0/texture = ExtResource( 1 ) | ||
0/tex_offset = Vector2( -12, -16 ) | ||
0/modulate = Color( 1, 1, 1, 1 ) | ||
0/region = Rect2( 0, 0, 192, 48 ) | ||
0/tile_mode = 2 | ||
0/autotile/icon_coordinate = Vector2( 0, 0 ) | ||
0/autotile/tile_size = Vector2( 48, 48 ) | ||
0/autotile/spacing = 0 | ||
0/autotile/occluder_map = [ ] | ||
0/autotile/navpoly_map = [ ] | ||
0/autotile/z_index_map = [ ] | ||
0/occluder_offset = Vector2( 0, 0 ) | ||
0/navigation_offset = Vector2( 0, 0 ) | ||
0/shapes = [ ] | ||
0/z_index = 0 |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 |
---|---|---|
@@ -0,0 +1,34 @@ | ||
[remap] | ||
|
||
importer="texture" | ||
type="StreamTexture" | ||
path="res://.import/ground_tiles.png-4d8a6cd1f11a2a09b1a3cb4fab4f01e5.stex" | ||
metadata={ | ||
"vram_texture": false | ||
} | ||
|
||
[deps] | ||
|
||
source_file="res://Images/Grounds/ground_tiles.png" | ||
dest_files=[ "res://.import/ground_tiles.png-4d8a6cd1f11a2a09b1a3cb4fab4f01e5.stex" ] | ||
|
||
[params] | ||
|
||
compress/mode=0 | ||
compress/lossy_quality=0.7 | ||
compress/hdr_mode=0 | ||
compress/bptc_ldr=0 | ||
compress/normal_map=0 | ||
flags/repeat=0 | ||
flags/filter=true | ||
flags/mipmaps=false | ||
flags/anisotropic=false | ||
flags/srgb=2 | ||
process/fix_alpha_border=true | ||
process/premult_alpha=false | ||
process/HDR_as_SRGB=false | ||
process/invert_color=false | ||
stream=false | ||
size_limit=0 | ||
detect_3d=true | ||
svg/scale=1.0 |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 |
---|---|---|
@@ -0,0 +1,34 @@ | ||
[remap] | ||
|
||
importer="texture" | ||
type="StreamTexture" | ||
path="res://.import/icon.png-5c54608cdf98940b04ad240121483c81.stex" | ||
metadata={ | ||
"vram_texture": false | ||
} | ||
|
||
[deps] | ||
|
||
source_file="res://Images/icon.png" | ||
dest_files=[ "res://.import/icon.png-5c54608cdf98940b04ad240121483c81.stex" ] | ||
|
||
[params] | ||
|
||
compress/mode=0 | ||
compress/lossy_quality=0.7 | ||
compress/hdr_mode=0 | ||
compress/bptc_ldr=0 | ||
compress/normal_map=0 | ||
flags/repeat=0 | ||
flags/filter=true | ||
flags/mipmaps=false | ||
flags/anisotropic=false | ||
flags/srgb=2 | ||
process/fix_alpha_border=true | ||
process/premult_alpha=false | ||
process/HDR_as_SRGB=false | ||
process/invert_color=false | ||
stream=false | ||
size_limit=0 | ||
detect_3d=true | ||
svg/scale=1.0 |
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 |
---|---|---|
@@ -0,0 +1,17 @@ | ||
namespace TradingCompany.Model { | ||
public class Board : IBoard { | ||
public Board(Field[][] fields) { | ||
Fields = fields; | ||
|
||
Rows = fields.Length; | ||
Columns = fields[0].Length; | ||
} | ||
|
||
public Field[][] Fields { get; } | ||
|
||
|
||
public int Rows { get; } | ||
|
||
public int Columns { get; } | ||
} | ||
} |
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 |
---|---|---|
@@ -0,0 +1,29 @@ | ||
using System; | ||
using TradingCompany.Model.Math; | ||
|
||
namespace TradingCompany.Model.Commands { | ||
public struct Command : IEquatable<Command> { | ||
public readonly IntVector2 TargetPosition; | ||
public readonly CommandType Type; | ||
|
||
public Command(IntVector2 targetPosition, | ||
CommandType type) { | ||
TargetPosition = targetPosition; | ||
Type = type; | ||
} | ||
|
||
public bool Equals(Command other) { | ||
return TargetPosition.Equals(other.TargetPosition) && Type == other.Type; | ||
} | ||
|
||
public override bool Equals(object obj) { | ||
return obj is Command other && Equals(other); | ||
} | ||
|
||
public override int GetHashCode() { | ||
unchecked { | ||
return (TargetPosition.GetHashCode() * 397) ^ (int) Type; | ||
} | ||
} | ||
} | ||
} |
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 |
---|---|---|
@@ -0,0 +1,6 @@ | ||
namespace TradingCompany.Model.Commands { | ||
public enum CommandType { | ||
Move, | ||
Attack | ||
} | ||
} |
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 |
---|---|---|
@@ -0,0 +1,14 @@ | ||
using TradingCompany.Model.Grounds; | ||
|
||
namespace TradingCompany.Model { | ||
public struct Field { | ||
public readonly int Row, Column; | ||
public readonly Ground Ground; | ||
|
||
public Field(int row, int column, Ground ground) { | ||
Row = row; | ||
Column = column; | ||
Ground = ground; | ||
} | ||
} | ||
} |
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 |
---|---|---|
@@ -0,0 +1,11 @@ | ||
namespace TradingCompany.Model.Grounds { | ||
public struct Ground { | ||
public GroundType GroundType; | ||
public bool IsAccessible; | ||
|
||
public Ground(GroundType groundType, bool isAccessible) { | ||
GroundType = groundType; | ||
IsAccessible = isAccessible; | ||
} | ||
} | ||
} |
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 |
---|---|---|
@@ -0,0 +1,12 @@ | ||
namespace TradingCompany.Model.Grounds { | ||
/// <summary> | ||
/// View Contract: | ||
/// The order in this enumerable needs to match the order of Tiles in the ground_tile_set.tres | ||
/// </summary> | ||
public enum GroundType { | ||
Water, | ||
Grass, | ||
Forest, | ||
Castle | ||
} | ||
} |
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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
namespace TradingCompany.Model.Grounds { | ||
public class GroundTypeConfig { | ||
public bool IsAccessible; | ||
} | ||
} |
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 |
---|---|---|
@@ -0,0 +1,35 @@ | ||
using System.Collections.Generic; | ||
|
||
namespace TradingCompany.Model.Grounds { | ||
public static class GroundTypesFactory { | ||
private static readonly Dictionary<GroundType, GroundTypeConfig> Configs = | ||
new Dictionary<GroundType, GroundTypeConfig> { | ||
{ | ||
GroundType.Water, | ||
new GroundTypeConfig { | ||
IsAccessible = false | ||
} | ||
}, { | ||
GroundType.Grass, | ||
new GroundTypeConfig { | ||
IsAccessible = true | ||
} | ||
}, { | ||
GroundType.Forest, | ||
new GroundTypeConfig { | ||
IsAccessible = false | ||
} | ||
}, { | ||
GroundType.Castle, | ||
new GroundTypeConfig { | ||
IsAccessible = true | ||
} | ||
} | ||
}; | ||
|
||
|
||
public static Ground Create(GroundType groundType) { | ||
return new Ground(groundType, Configs[groundType].IsAccessible); | ||
} | ||
} | ||
} |
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 |
---|---|---|
@@ -0,0 +1,8 @@ | ||
namespace TradingCompany.Model { | ||
public interface IBoard { | ||
int Rows { get; } | ||
int Columns { get; } | ||
|
||
Field[][] Fields { get; } | ||
} | ||
} |
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 |
---|---|---|
@@ -0,0 +1,6 @@ | ||
namespace TradingCompany.Model { | ||
public interface IGame { | ||
IBoard Board { get; } | ||
|
||
} | ||
} |
Oops, something went wrong.