Commit 976da4cd authored by 李维's avatar 李维

New uuid package

parent f829952a
...@@ -8,7 +8,7 @@ import { ...@@ -8,7 +8,7 @@ import {
HostListener HostListener
} from "@angular/core"; } from "@angular/core";
import { UUID } from 'angular2-uuid'; import { v4 as uuidv4 } from 'uuid';
import { import {
MySprite, MySprite,
...@@ -1199,14 +1199,14 @@ export class PlayComponent implements OnInit, OnDestroy { ...@@ -1199,14 +1199,14 @@ export class PlayComponent implements OnInit, OnDestroy {
line_1.setScaleXY(this.g_mapScale) line_1.setScaleXY(this.g_mapScale)
line_1.anchorX = (line_1.width - line_1.height / 2) / line_1.width; line_1.anchorX = (line_1.width - line_1.height / 2) / line_1.width;
line_1.anchorY = 0; line_1.anchorY = 0;
line_1.id = UUID.UUID(); line_1.id = uuidv4();
const line_2 = new MySprite(); const line_2 = new MySprite();
line_2.init(this.g_cartoon.images.get(color)); line_2.init(this.g_cartoon.images.get(color));
line_2.setScaleXY(this.g_mapScale) line_2.setScaleXY(this.g_mapScale)
line_2.anchorX = (line_2.width - line_2.height / 2) / line_2.width; line_2.anchorX = (line_2.width - line_2.height / 2) / line_2.width;
line_2.anchorY = 0; line_2.anchorY = 0;
line_2.id = UUID.UUID(); line_2.id = uuidv4();
line_1.visible = false line_1.visible = false
line_2.visible = false line_2.visible = false
...@@ -1216,7 +1216,7 @@ export class PlayComponent implements OnInit, OnDestroy { ...@@ -1216,7 +1216,7 @@ export class PlayComponent implements OnInit, OnDestroy {
line_3.setScaleXY(this.g_mapScale) line_3.setScaleXY(this.g_mapScale)
line_3.anchorX = (line_3.width - line_3.height / 2) / line_3.width; line_3.anchorX = (line_3.width - line_3.height / 2) / line_3.width;
line_3.anchorY = 0; line_3.anchorY = 0;
line_3.id = UUID.UUID(); line_3.id = uuidv4();
let target_1 = this.g_cartoon.getCartoonElement(T1).ref.dot let target_1 = this.g_cartoon.getCartoonElement(T1).ref.dot
let target_2 = this.g_cartoon.getCartoonElement(T2).ref.dot let target_2 = this.g_cartoon.getCartoonElement(T2).ref.dot
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment