| 12345678910111213141516171819202122 |
- namespace ET
- {
- [EntitySystemOf(typeof(Unit))]
- public static partial class UnitSystem
- {
- [EntitySystem]
- private static void Awake(this Unit self, int configId)
- {
- self.ConfigId = configId;
- }
- public static UnitConfig Config(this Unit self)
- {
- return UnitConfigCategory.Instance.Get(self.ConfigId);
- }
-
- public static int Type(this Unit self)
- {
- return self.Config().Type;
- }
- }
- }
|