Ejemplo n.º 1
0
        public static Face GetFace(FaceType type)
        {
            if (type == FaceType.None)
            {
                return(null);
            }

            return(AssetLoader.LoadScriptableObjectAsset <Face>(type.ToString()));
        }
Ejemplo n.º 2
0
    private GameObject AddChildObject(FaceType objectName)
    {
        var obj = new GameObject(objectName.ToString());

        obj.transform.parent        = transform;
        obj.transform.localPosition = Vector3.zero;
        var script = obj.AddComponent <QuadFace>();

        script.face    = objectName;
        script.samples = samples + 1;
        return(obj);
    }
Ejemplo n.º 3
0
 public override string ToString()
 {
     return(Type.ToString());
 }
Ejemplo n.º 4
0
    private GameObject ReattachChildObject(FaceType face)
    {
        var obj = transform.FindChild(face.ToString());

        return(obj == null?AddChildObject(face) : obj.gameObject);
    }