Can anyone convert this script to Javascript or tell me how to?
I spent all my time learning Javascript, so I’m not sure about most aspect of C#.
http://www.unifycommunity.com/wiki/index.php?title=Particle_Spiral_Effect
Can anyone convert this script to Javascript or tell me how to?
I spent all my time learning Javascript, so I’m not sure about most aspect of C#.
http://www.unifycommunity.com/wiki/index.php?title=Particle_Spiral_Effect
looking over the code I would suggest small changes to get it to java, however most of them are simple. Things like the struct should be converted to a class. The overall class "public class ParticleSpiralEffect : MonoBehaviour " should not be there as that would be the core of the java side.
Variables are declared differently:
public const int Min_numArms = 1;
Min_numArms : int= 1;
the class is then defined specifically.
SpiralSettings result;
var result : SpiralSettings = SpiralSettings();
Most everything else is simple and can be looked up, or works in both java and c#
Just to prevent any unnecessary confusion, the language in question isn’t actually Java, but rather JavaScript (aka UnityScript).
Sorry, can be looked up in the documentation for Unity, not just general Google searches. It will also take a healthy understanding of how objects are typed from C# to UnityScript (javascript) Where in c# you would type something as (myObject) in Java that would be (myObject : GameObject) but I didnt see much of that in there…
Apologies, but I’m not sure if I follow. Was the above in reference to my post, or was it directed at the OP?
(All I was saying in my post is that the language under discussion is JavaScript, not Java.)
Thanks for the replies, I’ll give it a shot later.