Skip to content

Commit

Permalink
#479 GameNodeMarker korrigieren
Browse files Browse the repository at this point in the history
  • Loading branch information
ZerlindaYu committed Oct 23, 2022
1 parent 5353f22 commit 644981b
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions Assets/SEE/Game/GameNodeMarker.cs
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,13 @@ public static GameObject AddMark(GameObject mark,int diameter,string nodeid)
else
{
Node node = NewGraphNode(nodeID);
mark = GameObject.CreatePrimitive(PrimitiveType.Sphere);
mark.transform.position = node.transform.position;
mark.transform.localScale = node.transform.localScale;
mark.GetComponent<SphereCollider>().radius = diameter;
mark.GetComponent<Renderer>().material.color = Color.Blue;
GameObject result = GameObject.CreatePrimitive(PrimitiveType.Sphere);
result.transform.position = node.transform.position;
result.transform.localScale = node.transform.localScale;
result.GetComponent<SphereCollider>().radius = diameter;
result.GetComponent<Renderer>().material.color = Color.Blue;
result.transform.SetParent(mark.transform);
Portal.SetPortal(city.gameObject,gameObject: result);
}
return mark;
}
Expand Down

0 comments on commit 644981b

Please sign in to comment.