add duders to the party
This commit is contained in:
parent
5b8f97e871
commit
e8f581dea8
13
Assets/Prefabs/Hero.prefab
generated
13
Assets/Prefabs/Hero.prefab
generated
@ -31,7 +31,7 @@ Transform:
|
|||||||
m_Children:
|
m_Children:
|
||||||
- {fileID: 4157508313357080045}
|
- {fileID: 4157508313357080045}
|
||||||
m_Father: {fileID: 0}
|
m_Father: {fileID: 0}
|
||||||
m_RootOrder: 2
|
m_RootOrder: 0
|
||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
--- !u!114 &7347972816793018538
|
--- !u!114 &7347972816793018538
|
||||||
MonoBehaviour:
|
MonoBehaviour:
|
||||||
@ -45,11 +45,12 @@ MonoBehaviour:
|
|||||||
m_Script: {fileID: 11500000, guid: 583304b24f3e6394f9e4d49747e22193, type: 3}
|
m_Script: {fileID: 11500000, guid: 583304b24f3e6394f9e4d49747e22193, type: 3}
|
||||||
m_Name:
|
m_Name:
|
||||||
m_EditorClassIdentifier:
|
m_EditorClassIdentifier:
|
||||||
Name:
|
name:
|
||||||
Class: {fileID: 0}
|
class_: {fileID: 0}
|
||||||
Level: 0
|
level: 0
|
||||||
XP: 0
|
xp: 0
|
||||||
Attrs: {fileID: 0}
|
attrs: {fileID: 0}
|
||||||
|
party: {fileID: 11400000, guid: c9a46588e6ec04d4d91bb80fdffd7869, type: 2}
|
||||||
--- !u!1 &4632618406133265053
|
--- !u!1 &4632618406133265053
|
||||||
GameObject:
|
GameObject:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
|
@ -13,4 +13,16 @@ public class HeroUnit : MonoBehaviour
|
|||||||
[SerializeField] private long level;
|
[SerializeField] private long level;
|
||||||
[SerializeField] private long xp;
|
[SerializeField] private long xp;
|
||||||
[SerializeField] private HeroAttributesSO attrs;
|
[SerializeField] private HeroAttributesSO attrs;
|
||||||
|
[SerializeField] private HeroPartySO party;
|
||||||
|
|
||||||
|
private void OnEnable()
|
||||||
|
{
|
||||||
|
// NOTE(zeph): Party is mandatory. If none is set, we want an exception.
|
||||||
|
party.Add(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void OnDisable()
|
||||||
|
{
|
||||||
|
party.Remove(this);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user