Upload files to "leenkx/Sources/leenkx/logicnode"
This commit is contained in:
		| @ -0,0 +1,23 @@ | ||||
| package leenkx.logicnode; | ||||
|  | ||||
| import iron.object.Object; | ||||
|  | ||||
| class SetParticleRenderEmitterNode extends LogicNode { | ||||
|  | ||||
| 	public function new(tree: LogicTree) { | ||||
| 		super(tree); | ||||
| 	} | ||||
|  | ||||
| 	override function run(from: Int) { | ||||
| 		#if lnx_particles | ||||
| 		var object: Object = inputs[1].get(); | ||||
|  | ||||
| 		if (object == null) return; | ||||
|  | ||||
| 		cast(object, iron.object.MeshObject).render_emitter = inputs[2].get(); | ||||
|  | ||||
| 		#end | ||||
|  | ||||
| 		runOutput(0); | ||||
| 	} | ||||
| } | ||||
		Reference in New Issue
	
	Block a user