Skip to content

Commit 1204a5d

Browse files
authored
Merge pull request #3 from ashblue/develop
Initial Release
2 parents b9f3bf6 + 917b27a commit 1204a5d

File tree

339 files changed

+29678
-323
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

339 files changed

+29678
-323
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ UIElementsSchema/
2222

2323
# Visual Studio cache directory
2424
.vs/
25+
.idea/
2526

2627
# Gradle cache directory
2728
.gradle/
@@ -43,6 +44,7 @@ ExportedObj/
4344
*.mdb
4445
*.opendb
4546
*.VC.db
47+
.vscode/
4648

4749
# Unity3D generated meta files
4850
*.pidb.meta
@@ -51,6 +53,7 @@ ExportedObj/
5153

5254
# Unity3D Generated File On Crash Reports
5355
sysinfo.txt
56+
mono_crash*
5457

5558
# Builds
5659
*.apk

.husky/commit-msg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
#!/usr/bin/env sh
22
. "$(dirname -- "$0")/_/husky.sh"
33

4-
npx --no -- commitlint --edit
4+
npx --no -- commitlint --edit ${1}

.releaserc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
{
2+
"branches": ["master", "main"],
23
"plugins": [
34
"@semantic-release/commit-analyzer",
45
"@semantic-release/release-notes-generator",
File renamed without changes.

Assets/Examples/CustomEntryTest.meta

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
using CleverCrow.Fluid.ElasticInventory;
2+
using UnityEngine;
3+
4+
namespace CleverCrow.Fluid.Examples {
5+
public class CustomEntrySaveLoadTest : MonoBehaviour {
6+
public InventoryHelper inventory;
7+
public ItemDefinitionWeapon weapon;
8+
public int changeDurability = 22;
9+
10+
private void Start () {
11+
// Create the item and modify the durability
12+
var entry = inventory.Instance.Add(weapon) as ItemEntryWeapon;
13+
Debug.Log("New item durability: " + entry.Durability);
14+
15+
entry.Durability = changeDurability;
16+
Debug.Log("Changed item durability: " + entry.Durability);
17+
18+
// Load the item from save data
19+
var save = inventory.Instance.Save();
20+
var newInventory = new InventoryInstance(ItemDatabase.Current);
21+
newInventory.Load(save);
22+
23+
// Print the durability of the loaded item
24+
var restoredItem = newInventory.GetEntry(entry.Id) as ItemEntryWeapon;
25+
Debug.Log("Restored item durability: " + restoredItem.Durability);
26+
}
27+
}
28+
}

Assets/Examples/CustomEntryTest/CustomEntrySaveLoadTest.cs.meta

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)