Advertisement
Guest User

Untitled

a guest
Feb 28th, 2016
143
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Haxe 0.25 KB | None | 0 0
  1. @:structInit
  2. class Test {
  3.    
  4.     static function main() {
  5.         // Equivalent to var obj = new Test(0, 1);
  6.         var obj:Test = { x:0, y:1 };
  7.     }
  8.    
  9.     public function new (x:Int, y:Int) {
  10.         this.x = x;
  11.         this.y = y;
  12.     }
  13. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement