Add falling animation
This commit is contained in:
parent
938f3def1f
commit
db6a31dd85
1 changed files with 213 additions and 154 deletions
|
|
@ -41,11 +41,17 @@ export class DataService extends Root<Page> {
|
|||
childrenConstructor: null
|
||||
}
|
||||
};
|
||||
|
||||
for (let page of pages) {
|
||||
new Page(this, page);
|
||||
}
|
||||
setTimeout(() => {
|
||||
this.children$.subscribe(value => {
|
||||
this.log();
|
||||
});
|
||||
}, 0);
|
||||
|
||||
this.children$.subscribe(value => {
|
||||
this.log();
|
||||
this._safeChildren.next(value);
|
||||
this.save(0);
|
||||
});
|
||||
|
|
@ -60,11 +66,12 @@ export class DataService extends Root<Page> {
|
|||
}
|
||||
|
||||
addPage(name: string) {
|
||||
new Page(this, {
|
||||
const page = new Page(this, {
|
||||
name,
|
||||
userData: {},
|
||||
towers: []
|
||||
});
|
||||
page.addTower();
|
||||
}
|
||||
|
||||
removePage(page: Page) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue