Commit 33d31985 authored by 智慧's avatar 智慧

feat:飞机可以跟随手指进行移动了

parent aaf83803
......@@ -18,6 +18,9 @@
},
{
"__id__": 6
},
{
"__id__": 12
}
],
"_active": false,
......@@ -510,5 +513,112 @@
},
"_enabled": true,
"_id": "a9iPVyldxOJKzrQ7Q43Chs"
},
{
"__type__": "cc.Node",
"_name": "player",
"_objFlags": 0,
"_parent": {
"__id__": 1
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 13
},
{
"__id__": 14
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 99,
"height": 123
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
240,
69.623,
0,
0,
0,
0,
1,
1,
1,
1
]
},
"_eulerAngles": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_skewX": 0,
"_skewY": 0,
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "62N5686zdI9qQzwSCDm9E7"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 12
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "1cb33543-745c-4b84-8602-636f73861b37"
},
"_type": 0,
"_sizeMode": 1,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": null,
"_id": "dcv/S9PdFGTJEZGq3C37IL"
},
{
"__type__": "71de2DgguxLNY4H0S5W6FOB",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 12
},
"_enabled": true,
"_id": "7cp3iohZBBer32Lh+4Acro"
}
]
\ No newline at end of file
const {ccclass, property} = cc._decorator;
@ccclass
export default class NewClass extends cc.Component {
start () {
this.node.on(cc.Node.EventType.TOUCH_MOVE, (event) => {
this.node.setPosition(event.getLocation());
});
}
// update (dt) {}
}
{
"ver": "1.0.8",
"uuid": "71de20e0-82ec-4b35-8e07-d12e56e85381",
"isPlugin": false,
"loadPluginInWeb": true,
"loadPluginInNative": true,
"loadPluginInEditor": false,
"subMetas": {}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "7b2a8d32-3477-4a33-8ce5-ead559daddb1",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 102,
"height": 126,
"platformSettings": {},
"subMetas": {
"me1": {
"ver": "1.0.4",
"uuid": "1cb33543-745c-4b84-8602-636f73861b37",
"rawTextureUuid": "7b2a8d32-3477-4a33-8ce5-ead559daddb1",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0.5,
"offsetY": -0.5,
"trimX": 2,
"trimY": 2,
"width": 99,
"height": 123,
"rawWidth": 102,
"rawHeight": 126,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
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