Wrap Transform into SkinContext. Implement r/w context separation for skins.

This commit is contained in:
2023-01-16 15:08:25 +08:00
parent d0a23aaf30
commit 43c87fba70
4 changed files with 105 additions and 66 deletions

View File

@@ -1,12 +1,17 @@
using UnityEngine;
using System.Collections.Generic;
using UnityEngine;
namespace Cryville.Crtr {
public class Anchor {
public int Name { get; private set; }
public Transform Transform { get; set; }
public Anchor(int name, Transform transform) {
public Transform Transform { get; private set; }
public SkinContext SkinContext { get; private set; }
public Dictionary<int, PropSrc.Arbitrary> PropSrcs { get; private set; }
public Anchor(int name, Transform transform, bool hasProps = false) {
Name = name;
Transform = transform;
if (hasProps) PropSrcs = new Dictionary<int, PropSrc.Arbitrary>();
SkinContext = new SkinContext(transform, PropSrcs);
}
}
}