Browse Source

Add constructor for Polygon

ShiroSmith 5 years ago
parent
commit
c67b4b15c7
1 changed files with 5 additions and 0 deletions
  1. 5 0
      hrt/prefab/l3d/Polygon.hx

+ 5 - 0
hrt/prefab/l3d/Polygon.hx

@@ -20,6 +20,11 @@ class Polygon extends Object3D {
 	var prevScale = [1.0, 1.0];
 	var prevScale = [1.0, 1.0];
 	#end
 	#end
 
 
+	public function new(?parent) {
+		super(parent);
+		type = "polygon";
+	}
+
 	override function save() {
 	override function save() {
 		var obj : Dynamic = super.save();
 		var obj : Dynamic = super.save();
 		switch(shape){
 		switch(shape){