瀏覽代碼

added init(seed)

ncannasse 12 年之前
父節點
當前提交
9f63568414
共有 1 個文件被更改,包括 4 次插入0 次删除
  1. 4 0
      hxd/Rand.hx

+ 4 - 0
hxd/Rand.hx

@@ -6,6 +6,10 @@ class Rand {
 	var seed2 : Int;
 
 	public function new( seed : Int ) {
+		init(seed);
+	}
+	
+	public function init(seed : Int) {
 		this.seed = seed;
 		this.seed2 = hash(seed);
 		if( this.seed == 0 ) this.seed = 1;