"i work at blizzard"
This commit is contained in:
@@ -11,6 +11,7 @@ public class BaseModel : Model
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public BaseModel(string nameHuman, string nameId, Mesh mesh, Material material, List<Port> ports, List<Color> colors = null)
|
||||
: base(nameHuman, nameId, mesh, material, ports, colors)
|
||||
{
|
||||
|
||||
@@ -13,10 +13,7 @@ public class BaseModelBehaviour : ModelBehaviour
|
||||
}
|
||||
throw new InvalidCastException("model needs to be of type BaseModel");
|
||||
}
|
||||
set
|
||||
{
|
||||
Model = value;
|
||||
}
|
||||
set { Model = value; }
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -17,10 +17,7 @@ public class ChildModelBehaviour : ModelBehaviour
|
||||
}
|
||||
throw new InvalidCastException("ChildModelBehaviour needs to be of type ChildModel");
|
||||
}
|
||||
internal set
|
||||
{
|
||||
Model = value;
|
||||
}
|
||||
internal set { Model = value; }
|
||||
}
|
||||
public ModelBehaviour Parent { get; set; }
|
||||
|
||||
|
||||
@@ -31,6 +31,7 @@ public class Model
|
||||
this.Color = color;
|
||||
this.Passthrough = passthrough;
|
||||
}
|
||||
|
||||
public Model(string nameHuman, string nameId, Mesh mesh, Material material, List<Port> ports = null, List<Color> color = null, bool passthrough = false)
|
||||
{
|
||||
this.NameHuman = nameHuman;
|
||||
|
||||
@@ -14,10 +14,7 @@ public class ModelBehaviour : MonoBehaviour, IResettable
|
||||
|
||||
internal Model Model
|
||||
{
|
||||
get
|
||||
{
|
||||
return _model;
|
||||
}
|
||||
get { return _model; }
|
||||
set
|
||||
{
|
||||
UpdateModel(value);
|
||||
@@ -43,10 +40,7 @@ public class ModelBehaviour : MonoBehaviour, IResettable
|
||||
Color _color = Color.black;
|
||||
Color Color
|
||||
{
|
||||
get
|
||||
{
|
||||
return _color;
|
||||
}
|
||||
get { return _color; }
|
||||
set
|
||||
{
|
||||
var clonedMaterial = new Material(meshRenderer.material); //clone da sonst alle anderen mit dem mat auch colorchanged werden
|
||||
@@ -266,6 +260,7 @@ public class ModelBehaviour : MonoBehaviour, IResettable
|
||||
}
|
||||
_children[portIndex].GetComponent<ChildModelBehaviour>().Color = color;
|
||||
}
|
||||
|
||||
public void ClearChildren()
|
||||
{
|
||||
Debug.Log($"Removing Children of {name}...");
|
||||
|
||||
@@ -74,6 +74,7 @@ public class Exploder : MonoBehaviour, IResettable, IPointerDownHandler
|
||||
models.Add(new ExploderModel(port, cmb.ChildModel, cmb));
|
||||
}
|
||||
}
|
||||
|
||||
void UpdateModelList()
|
||||
{
|
||||
List<ExploderModel> modelss = new List<ExploderModel>();
|
||||
|
||||
@@ -21,6 +21,7 @@ namespace UI
|
||||
lastClickTime = Time.time;
|
||||
TogglePassthrough();
|
||||
}
|
||||
|
||||
void Start()
|
||||
{
|
||||
gameObject.GetComponent<Button>().onClick.AddListener(TogglePassthrough);
|
||||
|
||||
@@ -19,14 +19,8 @@ public class ChildModelSelector : MonoBehaviour, IResettable
|
||||
private string portId { set; get; }
|
||||
public string PortID
|
||||
{
|
||||
set
|
||||
{
|
||||
portId = value;
|
||||
}
|
||||
get
|
||||
{
|
||||
return portId;
|
||||
}
|
||||
set { portId = value; }
|
||||
get { return portId; }
|
||||
}
|
||||
public int PortIndex { set; get; }
|
||||
|
||||
@@ -92,4 +86,3 @@ public class ChildModelSelector : MonoBehaviour, IResettable
|
||||
Buttons.Clear();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -16,6 +16,7 @@ public class PortSelectorButton : MonoBehaviour
|
||||
{
|
||||
this.GetOrAddComponent<Button>().onClick.AddListener(OnClick);
|
||||
}
|
||||
|
||||
public void OnClick()
|
||||
{
|
||||
Debug.Log($"Changing Port to {this}");
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using UnityEngine;
|
||||
|
||||
public class Marker : MonoBehaviour
|
||||
{
|
||||
//this script doesn't do anything else than allow for getcomponentsinchildren to find a targeted feature
|
||||
|
||||
@@ -98,9 +98,20 @@ public class ModelLoader
|
||||
ports.Add(modelElement.Ports);
|
||||
colors.Add(modelElement.Colors);
|
||||
}
|
||||
LoadChildModelsFromPackedModel(appendList, port.ToArray(), nameHuman.ToArray(), nameId.ToArray(),
|
||||
meshes, mats.ToArray(), offset.ToArray(), rotation.ToArray(),
|
||||
scale.ToArray(), ports.ToArray(), colors.ToArray(), fromMesh, toMesh, useSubmeshes);
|
||||
LoadChildModelsFromPackedModel(appendList,
|
||||
port.ToArray(),
|
||||
nameHuman.ToArray(),
|
||||
nameId.ToArray(),
|
||||
meshes,
|
||||
mats.ToArray(),
|
||||
offset.ToArray(),
|
||||
rotation.ToArray(),
|
||||
scale.ToArray(),
|
||||
ports.ToArray(),
|
||||
colors.ToArray(),
|
||||
fromMesh,
|
||||
toMesh,
|
||||
useSubmeshes);
|
||||
}
|
||||
|
||||
static List<Mesh> GetSubmeshes(Mesh mesh)
|
||||
|
||||
Reference in New Issue
Block a user