Game Development Reference
In-Depth Information
The new keyword
In JavaScript, you can create a new instance of an object or struct without using the new
keyword. In C#, using new is mandatory:
// JavaScript user:
var myPosition = Vector3(0,0,0);
var myInstance = MyClass();
//We can also use new keyword in JavaScript
var myInstance = new MyClass();
// C# user:
Vector3 myPosition = new Vector3(0,0,0);
MyClass myInstance = new MyClass();
Search WWH ::




Custom Search