Skip to content

Commit

Permalink
Merge pull request #500 from kreghek/master
Browse files Browse the repository at this point in the history
Подготовка релиза на GameDev Irkutsk
  • Loading branch information
kreghek authored Aug 29, 2019
2 parents eb1ff95 + df19d6e commit 26d45f3
Show file tree
Hide file tree
Showing 132 changed files with 9,767 additions and 729 deletions.
8 changes: 8 additions & 0 deletions Zilon.Client/Assets/Editor.meta

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

52 changes: 52 additions & 0 deletions Zilon.Client/Assets/Editor/AutoSaveOnRunMenuItem.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
using UnityEngine;
using UnityEditor;
using UnityEditor.SceneManagement;

[InitializeOnLoad]
public class AutoSaveOnRunMenuItem
{
public const string MenuName = "Tools/Autosave On Run";
private static bool isToggled;

static AutoSaveOnRunMenuItem()
{
EditorApplication.delayCall += () =>
{
isToggled = EditorPrefs.GetBool(MenuName, false);
UnityEditor.Menu.SetChecked(MenuName, isToggled);
SetMode();
};
}

[MenuItem(MenuName)]
private static void ToggleMode()
{
isToggled = !isToggled;
UnityEditor.Menu.SetChecked(MenuName, isToggled);
EditorPrefs.SetBool(MenuName, isToggled);
SetMode();
}

private static void SetMode()
{
if (isToggled)
{
EditorApplication.playModeStateChanged += AutoSaveOnRun;
}
else
{
EditorApplication.playModeStateChanged -= AutoSaveOnRun;
}
}

private static void AutoSaveOnRun(PlayModeStateChange state)
{
if (EditorApplication.isPlayingOrWillChangePlaymode && !EditorApplication.isPlaying)
{
Debug.Log("Auto-Saving before entering Play mode");

EditorSceneManager.SaveOpenScenes();
AssetDatabase.SaveAssets();
}
}
}
11 changes: 11 additions & 0 deletions Zilon.Client/Assets/Editor/AutoSaveOnRunMenuItem.cs.meta

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

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

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

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
91 changes: 91 additions & 0 deletions Zilon.Client/Assets/Resources/Icons/props/knitted-hat.png.meta

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

Binary file modified Zilon.Client/Assets/Resources/Icons/props/leather-helmet.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
30 changes: 11 additions & 19 deletions Zilon.Client/Assets/Resources/Icons/props/leather-helmet.png.meta

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

5 changes: 5 additions & 0 deletions Zilon.Client/Assets/Resources/Schemes/DropTables/default.json
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,11 @@
]
}
]
},
{
"SchemeSid": "knitted-hat",

"Weight": 10
},
{
"SchemeSid": "leather-helmet",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,19 @@
"Records": [
{
"SchemeSid": "steel-helmet",
"Weight": 10
"Weight": 5
},
{
"SchemeSid": "leather-helmet",
"Weight": 10
},
{
"SchemeSid": "closed-leather-helmet",
"Weight": 5
},
{
"SchemeSid": "knitted-hat",
"Weight": 10
},
{
"SchemeSid": "wizard-hat",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
},
{
"SchemeSid": null,
"Weight": 300
"Weight": 600
}
]
}
10 changes: 5 additions & 5 deletions Zilon.Client/Assets/Resources/Schemes/Locations/rat-kingdom.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,24 +27,24 @@
{
"Sid": "lvl2",
"Name":{
"En": "Rat Kingdom Suare"
"En": "Rat Kingdom Square"
},

"RegularMonsterSids": ["rat", "bat"],
"RareMonsterSids": ["rat-mutant", "moon-rat"],
"ChampionMonsterSids": null,
"ChampionMonsterSids": ["rat-human-slayer", "night-stalker"],
"RegionCount": 10,
"RegionSize": 5,
"RegionMonsterCount": 5,

"TransSectorSids": ["lvl3", "lvl-barracks"],
"TransSectorSids": ["lvl-throne", "lvl-barracks"],

"TotalChestCount": 20,
"RegionChestCountRatio": 9,
"ChestDropTableSids": ["survival", "default"]
},
{
"Sid": "lvl3",
"Sid": "lvl-throne",
"Name":{
"En": "Rat Kingdom Throne"
},
Expand Down Expand Up @@ -77,7 +77,7 @@
"RegionChestCountRatio": 9,
"ChestDropTableSids": ["survival", "default"],

"TransSectorSids": ["lvl3", "lvl-barracks"]
"TransSectorSids": ["lvl-throne", "lvl-barracks"]
}
]
}
Loading

0 comments on commit 26d45f3

Please sign in to comment.