Skip to content

Commit

Permalink
More assets and #67
Browse files Browse the repository at this point in the history
  • Loading branch information
jellewie committed Oct 13, 2018
1 parent ef153d9 commit 847cf8c
Show file tree
Hide file tree
Showing 11 changed files with 6,644 additions and 37 deletions.
6,408 changes: 6,408 additions & 0 deletions Assets/Prefab/Buildings/Granary.prefab

Large diffs are not rendered by default.

8 changes: 8 additions & 0 deletions Assets/Prefab/Buildings/Granary.prefab.meta

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

2 changes: 1 addition & 1 deletion Assets/Prefab/Buildings/Ox_Transport.prefab
Original file line number Diff line number Diff line change
Expand Up @@ -1369,7 +1369,7 @@ MonoBehaviour:
MaxHealth: 10
Used: 0
Active: 0
SelectedOption: 0
SelectedOption: 254
Health: 0
OwnerID: 0
--- !u!114 &114399003166486638
Expand Down
32 changes: 25 additions & 7 deletions Assets/_Code/BuildingPopUp.cs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ void InputDropdown(Dropdown change)
}
public void ChangeOption(GameObject Building, byte ClickSpecial, bool PopUp, byte ToOption) //when ToOption 255 = Dont know the option.
{
if (ClickSpecial == 1) //If it's a Gate
if (ClickSpecial == 1) //If it's a Gate
{
GameObject Gate = Building.transform.Find("Gate").gameObject; //Get the gate
if (ToOption < 255) //If we need to go to an option
Expand Down Expand Up @@ -77,7 +77,6 @@ public void ChangeOption(GameObject Building, byte ClickSpecial, bool PopUp, byt
{
if (ToOption < 255) //If we need to go to an option
{
Debug.Log("Keep settings =" + ToOption);
//If option has been given, and we need to do something custom (Like; gate is placed, open gate)
}
else
Expand All @@ -87,12 +86,12 @@ public void ChangeOption(GameObject Building, byte ClickSpecial, bool PopUp, byt
if (PopUp) //If we need a PopUp window
{
DropDownMenu.ClearOptions(); //Clear the old options of the Dropdown menu
DropDownMenu.AddOptions(new List<string> { "+8 tax -8 happiness", "+4 tax -4 happiness", "+2 tax -2 happiness", "no tax +1 happiness", "-2 tax +2 happiness", "-2 tax +2 happiness", "-4 tax +4 happiness", "-8 tax +8 happiness"}); //Add the options to the dropdown menu
DropDownMenu.AddOptions(new List<string> {"+8 tax -8 happiness", "+4 tax -4 happiness", "+2 tax -2 happiness", "no tax +1 happiness", "-2 tax +2 happiness", "-2 tax +2 happiness", "-4 tax +4 happiness", "-8 tax +8 happiness"}); //Add the options to the dropdown menu
DropDownMenu.value = ToOption; //Set the gate to the selected option
}
Building.GetComponent<BuildingOption>().SelectedOption = ToOption; //Update the Building with this info
}
else if(ClickSpecial == 3) //If it's a Ox_Transport
else if (ClickSpecial == 3) //If it's a Ox_Transport
{
if (ToOption < 255) //If we need to go to an option
{
Expand All @@ -109,7 +108,7 @@ public void ChangeOption(GameObject Building, byte ClickSpecial, bool PopUp, byt
if (PopUp) //If we need a PopUp window
{
DropDownMenu.ClearOptions(); //Clear the old options of the Dropdown menu
DropDownMenu.AddOptions(new List<string> { "Wood", "Stone", "Iron" }); //Add the options to the dropdown menu
DropDownMenu.AddOptions(new List<string> {"Wood", "Stone", "Iron"}); //Add the options to the dropdown menu
DropDownMenu.value = ToOption; //Set the gate to the selected option
}
Building.GetComponent<BuildingOption>().SelectedOption = ToOption; //Update the Building with this info
Expand All @@ -131,12 +130,31 @@ public void ChangeOption(GameObject Building, byte ClickSpecial, bool PopUp, byt
if (PopUp) //If we need a PopUp window
{
DropDownMenu.ClearOptions(); //Clear the old options of the Dropdown menu
DropDownMenu.AddOptions(new List<string> {"Ox tether", "Move by itself"}); //Add the options to the dropdown menu
DropDownMenu.AddOptions(new List<string> {"Ox tether", "Move by itself"}); //Add the options to the dropdown menu
DropDownMenu.value = ToOption; //Set the gate to the selected option
}
Building.GetComponent<BuildingOption>().SelectedOption = ToOption; //Update the Building with this info
}
else if (ClickSpecial == 4) //If it's a XXXX
else if (ClickSpecial == 5) //If it's a Granary
{
if (ToOption < 255) //If we need to go to an option
{
//If option has been given, and we need to do something custom (Like; gate is placed, open gate)
}
else
{
//Unknow status, read the building state (like 'ToOption = Gate is open')
ToOption = SelectedBuilding.GetComponent<BuildingOption>().SelectedOption;
}
if (PopUp) //If we need a PopUp window
{
DropDownMenu.ClearOptions(); //Clear the old options of the Dropdown menu
DropDownMenu.AddOptions(new List<string> { "No food (-8 happiness)", "Half rations (-4 happiness)", "Normal", "Extra rations (+4 happiness)", "Double rations (+8 happiness)" }); //Add the options to the dropdown menu
DropDownMenu.value = ToOption; //Set the gate to the selected option
}
Building.GetComponent<BuildingOption>().SelectedOption = ToOption; //Update the Building with this info
}
else if (ClickSpecial == 255) //If it's a XXXX
{
if (ToOption < 255) //If we need to go to an option
{
Expand Down
39 changes: 19 additions & 20 deletions Assets/_Code/InputManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -175,8 +175,8 @@ public void ResetBoolSettings()
BuildingCostArray[6] = new Building("Trap_Pit", 5, 0, 0, 0, false, 0, 0, 0);
BuildingCostArray[7] = new Building("Keep", 0, 0, 0, 0, false, 0, 2, 0);

BuildingCostArray[8] = new Building("Armory", 10, 5, 0, 0, false, 0, 0, 0);
BuildingCostArray[9] = new Building("Barracks", 5, 15, 0, 0, false, 0, 0, 0);
BuildingCostArray[8] = new Building("Armory", 10, 5, 0, 0, false, 0, 6, 0);
BuildingCostArray[9] = new Building("Barracks", 5, 15, 0, 0, false, 0, 7, 0);
BuildingCostArray[10] = new Building("Swords_Maker", 0, 0, 0, 150,false, 0, 0, 0);
BuildingCostArray[11] = new Building("Bow_Maker", 0, 0, 0, 150,false, 0, 0, 0);
BuildingCostArray[12] = new Building("Spear_Maker", 0, 0, 0, 150,false, 0, 0, 0);
Expand All @@ -195,14 +195,14 @@ public void ResetBoolSettings()
BuildingCostArray[25] = new Building("Stone_Stair", 0, 5, 0, 0, false, 2, 0, 0);
BuildingCostArray[24] = new Building("Stone_Tower", 0, 40, 0, 0, false, 0, 0, 0);

BuildingCostArray[26] = new Building("Stockpile", 0, 5, 0, 0, true, 0, 0, 0);
BuildingCostArray[26] = new Building("Stockpile", 0, 5, 0, 0, true, 0, 8, 0);
BuildingCostArray[27] = new Building("Lumberjack_Hut", 10, 0, 0, 0, true, 0, 4, 0);
BuildingCostArray[28] = new Building("Stone_Quarry", 20, 0, 0, 0, false, 0, 5, 0);
BuildingCostArray[29] = new Building("Iron_Mine", 20, 0, 0, 0, false, 0, 6, 0);
BuildingCostArray[28] = new Building("Stone_Quarry", 20, 0, 0, 0, false, 0, 4, 0);
BuildingCostArray[29] = new Building("Iron_Mine", 20, 0, 0, 0, false, 0, 4, 0);
BuildingCostArray[30] = new Building("Ox_Transport", 3, 0, 0, 5, false, 0, 3, 0);
BuildingCostArray[31] = new Building("Repair_Building", 10, 5, 0, 0, false, 0, 0, 0);

BuildingCostArray[32] = new Building("Granary", 25, 0, 0, 0, true, 0, 7, 0);
BuildingCostArray[32] = new Building("Granary", 25, 0, 0, 0, true, 0, 5, 0);
BuildingCostArray[33] = new Building("Apple_Farm", 10, 0, 0, 0, false, 0, 0, 0);
BuildingCostArray[34] = new Building("Cow_Farm", 20, 0, 0, 0, false, 0, 0, 0);
BuildingCostArray[35] = new Building("Hunter", 10, 0, 0, 0, false, 0, 0, 0);
Expand All @@ -212,8 +212,8 @@ public void ResetBoolSettings()
BuildingCostArray[39] = new Building("Fischer", 10, 0, 0, 0, false, 0, 0, 0);

BuildingCostArray[40] = new Building("Home", 15, 0, 0, 0, false, 0, 0, 0);
BuildingCostArray[41] = new Building("Trading_House", 25, 5, 0, 0, false, 0, 0, 0);
BuildingCostArray[42] = new Building("Church", 20, 40, 0, 0, false, 0, 0, 0);
BuildingCostArray[41] = new Building("Trading_House", 25, 5, 0, 0, false, 0, 9, 0);
BuildingCostArray[42] = new Building("Church", 20, 40, 0, 0, false, 0, 10, 0);
BuildingCostArray[43] = new Building("Water_Well", 0, 10, 0, 0, false, 0, 0, 0);
BuildingCostArray[44] = new Building("Alchemist", 10, 10, 0, 0, false, 0, 0, 0);

Expand All @@ -222,18 +222,17 @@ public void ResetBoolSettings()
1 Wall
2 Stair
SpecialClick
1 Gate (gate stats: Open, Close)
2 Keep (tax rate= +8tax -8 happy, +4, +2, 0, -2, -4, -8) Default:3 (0 tax)
3 Ox_Transport (only move this resource = Wood, Stone, Iron) 254 = not set yet
TODO:
4 Lumberjack_Hut
5 Stone_Quarry
6 Iron_Mine
7 Granary
SpecialClick (Please check BuildingPopUp.cs in the code 'if (PopUp)' to what options we have
1 Gate (gate status)
2 Keep (tax rate) Default:3-no tax
3 Ox_Transport (only move this resource) 254 = not set yet
4 Lumberjack_Hut || Stone_Quarry || Iron_Mine (How to move the products)
5 Granary (Rations)[also Needs a new window] See whats in the Granary - ?ban sertain food to be consumed?
6 Armory [Needs a new window] See whats in the Armory
7 Barracks [Needs a new window] Build troops (with auto buy tools option)
8 Stockpile [Needs a new window] See whats in the stockpile
9 Trading_House [Needs a new window]
10 Church [Needs a new window] Bribe/donate
*/
}
public Building GetInfo(String ItemName) //Get building information about a building
Expand Down
20 changes: 11 additions & 9 deletions Assets/_Scenes/Game.unity
Original file line number Diff line number Diff line change
Expand Up @@ -1989,12 +1989,12 @@ MonoBehaviour:
m_Script: {fileID: 1980459831, guid: f70555f144d8491a825f0804e09c671c, type: 3}
m_Name:
m_EditorClassIdentifier:
m_UiScaleMode: 0
m_ReferencePixelsPerUnit: 100
m_UiScaleMode: 1
m_ReferencePixelsPerUnit: 300
m_ScaleFactor: 1
m_ReferenceResolution: {x: 800, y: 600}
m_ReferenceResolution: {x: 1920, y: 1080}
m_ScreenMatchMode: 0
m_MatchWidthOrHeight: 0
m_MatchWidthOrHeight: 0.5
m_PhysicalUnit: 3
m_FallbackScreenDPI: 96
m_DefaultSpriteDPI: 96
Expand Down Expand Up @@ -9860,7 +9860,7 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 0, y: 0}
m_AnchoredPosition: {x: 0, y: 0.000030517578}
m_SizeDelta: {x: 132, y: 792}
m_Pivot: {x: 0, y: 1}
--- !u!114 &1148183691
Expand Down Expand Up @@ -10018,7 +10018,7 @@ GameObject:
- component: {fileID: 1157497908}
- component: {fileID: 1157497907}
m_Layer: 5
m_Name: NPC
m_Name: Granary
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
Expand Down Expand Up @@ -10055,7 +10055,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: bcc44a087b920a8478d129c76388d3c5, type: 3}
m_Name:
m_EditorClassIdentifier:
Prefab: {fileID: 1218833079520110, guid: d9e0e96bd06be0e49b9acc54349362ac, type: 2}
Prefab: {fileID: 1661641720751892, guid: 0e33410c4ac45034b85b61aacb4f3ca4, type: 2}
Direction: L
HoverText:
--- !u!114 &1157497908
Expand Down Expand Up @@ -16840,18 +16840,20 @@ MonoBehaviour:
FolderBuildings: {fileID: 1040418256}
FolderBuildingPopUp: {fileID: 2038742038}
Objects:
- {fileID: 1449597463970802, guid: d59882d978470644a8d8d0bff6166a83, type: 2}
- {fileID: 1335642426604520, guid: ee0f726c13134e64eadab71ebf6ecf1d, type: 2}
- {fileID: 1518189309683664, guid: 400e3ec5102d3e74392f65cc92dfddd0, type: 2}
- {fileID: 1694769588477578, guid: 902764a20dfa34541ada2cfc1874467f, type: 2}
- {fileID: 1772977213243242, guid: 9cc77d332f2fecd40b4fbc3043d56906, type: 2}
- {fileID: 1076742404099274, guid: fb26230672eb9ae43bfeae8bc21ce75b, type: 2}
- {fileID: 1248628884232380, guid: b7f97661288525346965cbd5a8b15389, type: 2}
- {fileID: 1566477341485188, guid: 5df8ec5d34af89b47beb5f971d62b550, type: 2}
- {fileID: 1776771673142434, guid: 15d4323707a352a47a4a9b123caae998, type: 2}
- {fileID: 1073011646557830, guid: 86035fefacec54b48af1d1e43b855c6d, type: 2}
- {fileID: 1745047805458212, guid: d22ffed4f20bb0141a910122ef16b853, type: 2}
- {fileID: 1952451221755246, guid: b6f2fc750d6222149ab4b44218f6843a, type: 2}
- {fileID: 1043776130087816, guid: d997ec61ed63c754690d6ea9633d7679, type: 2}
- {fileID: 1152311152674546, guid: f6a14ca6c81471548a805b365fcc7842, type: 2}
- {fileID: 1592300623626486, guid: f5734411c120ed248a6b166c1c5f2c2f, type: 2}
- {fileID: 1671724563529492, guid: fc2a03ac16178584096eb9999f026132, type: 2}
- {fileID: 1687879694447944, guid: 9ae5f0300bacade46a6641e5469e8875, type: 2}
--- !u!4 &1887181084
Transform:
Expand Down
Binary file modified Assets/_textures/Images/LogSide.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Assets/_textures/Images/hay.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
88 changes: 88 additions & 0 deletions Assets/_textures/Images/hay.png.meta

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

76 changes: 76 additions & 0 deletions Assets/_textures/Materials/hay.mat
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 6
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name: hay
m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0}
m_ShaderKeywords:
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}
disabledShaderPasses: []
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _BumpMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailAlbedoMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailMask:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailNormalMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _EmissionMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MainTex:
m_Texture: {fileID: 2800000, guid: 800542e6db2f63847a4e160c22519205, type: 3}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MetallicGlossMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _OcclusionMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _ParallaxMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Floats:
- _BumpScale: 1
- _Cutoff: 0.5
- _DetailNormalMapScale: 1
- _DstBlend: 0
- _GlossMapScale: 1
- _Glossiness: 0.5
- _GlossyReflections: 1
- _Metallic: 0
- _Mode: 0
- _OcclusionStrength: 1
- _Parallax: 0.02
- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1
- _SrcBlend: 1
- _UVSec: 0
- _ZWrite: 1
m_Colors:
- _Color: {r: 1, g: 1, b: 1, a: 1}
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
Loading

0 comments on commit 847cf8c

Please sign in to comment.