Commit c2b3ed90 authored by Vũ Gia Vương's avatar Vũ Gia Vương

add BacksideFragment

parent d3dc4b79
This diff is collapsed.
{
"ver": "2.3.7",
"uuid": "b1af965d-9c1d-4d02-8939-aa69c9d0747d",
"importer": "texture",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 479,
"height": 473,
"platformSettings": {},
"subMetas": {
"1 copy 2": {
"ver": "1.0.6",
"uuid": "b117eb8d-bd31-4408-b981-ea6ad881a795",
"importer": "sprite-frame",
"rawTextureUuid": "b1af965d-9c1d-4d02-8939-aa69c9d0747d",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 479,
"height": 473,
"rawWidth": 479,
"rawHeight": 473,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "2.3.7",
"uuid": "ba1207d4-688e-4d00-8999-5f8c0618c65e",
"importer": "texture",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 305,
"height": 294,
"platformSettings": {},
"subMetas": {
"2 copy": {
"ver": "1.0.6",
"uuid": "8efea01a-9c37-49db-a773-85528999b313",
"importer": "sprite-frame",
"rawTextureUuid": "ba1207d4-688e-4d00-8999-5f8c0618c65e",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 305,
"height": 294,
"rawWidth": 305,
"rawHeight": 294,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "2.3.7",
"uuid": "1e1f7325-b177-452e-860f-0f27c9c9f392",
"importer": "texture",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 284,
"height": 143,
"platformSettings": {},
"subMetas": {
"Layer 1": {
"ver": "1.0.6",
"uuid": "b6f0c2f5-ac4a-4ee0-a720-f09cf30c7786",
"importer": "sprite-frame",
"rawTextureUuid": "1e1f7325-b177-452e-860f-0f27c9c9f392",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 284,
"height": 143,
"rawWidth": 284,
"rawHeight": 143,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "2.3.7",
"uuid": "a914e87f-8753-4ea6-b667-e857c9e25b35",
"importer": "texture",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 276,
"height": 136,
"platformSettings": {},
"subMetas": {
"Layer 2": {
"ver": "1.0.6",
"uuid": "a07406d5-7f7c-478d-a4f3-a635fea47869",
"importer": "sprite-frame",
"rawTextureUuid": "a914e87f-8753-4ea6-b667-e857c9e25b35",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 276,
"height": 136,
"rawWidth": 276,
"rawHeight": 136,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
const { ccclass, property } = cc._decorator;
@ccclass
export default class BacksideFragment extends cc.Component {
@property(cc.Node)
private frontSideNode: cc.Node = null;
private _offsetPos: cc.Vec3 = null;
protected onLoad(): void {
this._offsetPos = this.node.position.clone().sub(this.frontSideNode.position);
}
protected update(dt: number): void {
this.node.angle = this.frontSideNode.angle;
this.node.position = this.frontSideNode.position.clone().add(this._offsetPos);
}
}
{
"ver": "1.1.0",
"uuid": "fb50bcec-3182-46f0-9261-0b4788d40d5c",
"importer": "typescript",
"isPlugin": false,
"loadPluginInWeb": true,
"loadPluginInNative": true,
"loadPluginInEditor": false,
"subMetas": {}
}
\ No newline at end of file
......@@ -32,7 +32,7 @@ export default class FragmentController extends cc.Component {
private checkTouch(point: cc.Vec2) {
const pos = point.clone().subtract(cc.v2(this.node.position.x, this.node.position.y));
let isInside = cc.Intersection.pointInPolygon(pos, this._collider.points);
if (isInside) {
eventTarget.emit(HAMMER, point);
......@@ -48,14 +48,16 @@ export default class FragmentController extends cc.Component {
.call(() => {
eventTarget.emit(PLAY_DROP_SOUND);
})
.to(0.2, { scale: 0.95 })
.to(0.2, { scale: 1.05, position: pos.clone().multiplyScalar(1.2) })
.to(0.1, { scale: 0.9 })
.to(0.1, { scale: 1.05 })
.to(0.2, { position: pos.clone().multiplyScalar(1.2) })
.call(() => {
this._physicsCollider.enabled = true;
this._rg.type = cc.RigidBodyType.Dynamic;
this._rg.gravityScale = 5;
})
.delay(1)
.to(0, { scale: 1 })
.call(() => {
eventTarget.emit(CHECK_FRAGMENT, this.node.name);
})
......
......@@ -94,7 +94,6 @@ export default class HuController extends cc.Component {
private onTouchEnd(): void {
this.scheduleOnce(() => {
this._spine.timeScale = 0;
console.log('this._track.trackTime', this._track.trackTime)
if (this._track.trackTime < 0) {
this._track.trackTime = this._track.animationEnd - 1e-9;
}
......
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