Commit d9acf969 by 李楚霏

调整

parent 2f6ddd04
{
"ver": "1.0.1",
"uuid": "1771ba43-a616-4736-a403-39e6520b233b",
"isSubpackage": false,
"subpackageName": "",
"subMetas": {}
}
\ No newline at end of file
{
"ver": "2.3.4",
"uuid": "3b3ebca6-d33a-4209-b60c-f7f105350da6",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 48,
"height": 101,
"platformSettings": {},
"subMetas": {
"backhook": {
"ver": "1.0.4",
"uuid": "1bb3ecd0-b47e-4aca-8ecb-6b66165f9d2b",
"rawTextureUuid": "3b3ebca6-d33a-4209-b60c-f7f105350da6",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 48,
"height": 101,
"rawWidth": 48,
"rawHeight": 101,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "2.3.4",
"uuid": "81c547f9-22b2-45ac-adf6-87c33048fba3",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 24,
"height": 24,
"platformSettings": {},
"subMetas": {
"ball": {
"ver": "1.0.4",
"uuid": "553b68f9-1469-4449-b231-7b9cdbb64127",
"rawTextureUuid": "81c547f9-22b2-45ac-adf6-87c33048fba3",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 24,
"height": 24,
"rawWidth": 24,
"rawHeight": 24,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "2.3.4",
"uuid": "7b56d927-1c44-4c67-946b-ad4c32376d3f",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 180,
"height": 179,
"platformSettings": {},
"subMetas": {
"blackidlerwheel": {
"ver": "1.0.4",
"uuid": "a49296b4-0245-4b53-b2cf-d8679eb2f79a",
"rawTextureUuid": "7b56d927-1c44-4c67-946b-ad4c32376d3f",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 180,
"height": 179,
"rawWidth": 180,
"rawHeight": 179,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "2.3.4",
"uuid": "ea90507e-9530-4498-a896-10dba73484a6",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 112,
"height": 137,
"platformSettings": {},
"subMetas": {
"blueballoon": {
"ver": "1.0.4",
"uuid": "3e97285c-b42f-4bf2-9f17-2c5e3b8606c3",
"rawTextureUuid": "ea90507e-9530-4498-a896-10dba73484a6",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 112,
"height": 137,
"rawWidth": 112,
"rawHeight": 137,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "2.3.4",
"uuid": "75486670-7f31-4f3d-93ef-304fddc4100e",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 18,
"height": 71,
"platformSettings": {},
"subMetas": {
"circleback": {
"ver": "1.0.4",
"uuid": "fee5fba1-49fd-4dd3-a9c7-dbe44203dfbc",
"rawTextureUuid": "75486670-7f31-4f3d-93ef-304fddc4100e",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 18,
"height": 71,
"rawWidth": 18,
"rawHeight": 71,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "2.3.4",
"uuid": "305be524-f298-4fb7-b874-1e278c9f3c47",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 18,
"height": 71,
"platformSettings": {},
"subMetas": {
"circlefront": {
"ver": "1.0.4",
"uuid": "5d1b707f-cc85-4ce4-a99c-dc05d302c5ef",
"rawTextureUuid": "305be524-f298-4fb7-b874-1e278c9f3c47",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 18,
"height": 71,
"rawWidth": 18,
"rawHeight": 71,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "2.3.4",
"uuid": "130be645-2924-4211-9b5f-a3115916d966",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 59,
"height": 50,
"platformSettings": {},
"subMetas": {
"hexagon": {
"ver": "1.0.4",
"uuid": "fb2203d9-102b-4613-9649-13c3d1241ce3",
"rawTextureUuid": "130be645-2924-4211-9b5f-a3115916d966",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 59,
"height": 50,
"rawWidth": 59,
"rawHeight": 50,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "2.3.4",
"uuid": "2d4d1824-b153-4d20-9f28-ae0fe0911273",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 111,
"height": 649,
"platformSettings": {},
"subMetas": {
"rope": {
"ver": "1.0.4",
"uuid": "7884c6b0-ce6a-438b-a8db-6755ad7552e7",
"rawTextureUuid": "2d4d1824-b153-4d20-9f28-ae0fe0911273",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 111,
"height": 649,
"rawWidth": 111,
"rawHeight": 649,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "2.3.4",
"uuid": "453e1562-85f2-4802-919f-0af43e6bb9b3",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 187,
"height": 182,
"platformSettings": {},
"subMetas": {
"stone": {
"ver": "1.0.4",
"uuid": "7806237a-ea95-49fe-9236-b1098e4ef4cb",
"rawTextureUuid": "453e1562-85f2-4802-919f-0af43e6bb9b3",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 187,
"height": 182,
"rawWidth": 187,
"rawHeight": 182,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "2.3.4",
"uuid": "477296ba-f255-4095-afc7-7f90d6d9ad92",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 48,
"height": 101,
"platformSettings": {},
"subMetas": {
"yellowhook": {
"ver": "1.0.4",
"uuid": "066a0599-8c55-4350-a786-53a041c16819",
"rawTextureUuid": "477296ba-f255-4095-afc7-7f90d6d9ad92",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 48,
"height": 101,
"rawWidth": 48,
"rawHeight": 101,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "2.3.4",
"uuid": "aca79b1e-0912-4a99-8530-fb0b252c8037",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 180,
"height": 179,
"platformSettings": {},
"subMetas": {
"yellowidlerwheel": {
"ver": "1.0.4",
"uuid": "83d8cbfc-a72b-461e-ba23-ddd371a8d2a3",
"rawTextureUuid": "aca79b1e-0912-4a99-8530-fb0b252c8037",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 180,
"height": 179,
"rawWidth": 180,
"rawHeight": 179,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
......@@ -16,44 +16,96 @@ export default class NewClass extends cc.Component {
rigidBody: cc.RigidBody;
motor: cc.MotorJoint;
collider: cc.PhysicsPolygonCollider;
startPoint: cc.Vec2;
// LIFE-CYCLE CALLBACKS:
onPreSolve(contact, selfCollider, otherCollider) {
// console.error(otherCollider.node.name);
// if (otherCollider && otherCollider.node.getComponent(cc.MotorJoint)) {
// // this.rigidBody.awake = false;
// console.error(selfCollider.name);
// otherCollider.node.addComponent(cc.MotorJoint);
// const motor = otherCollider.node.getComponent(cc.MotorJoint);
// motor.connectedBody = this.node;
// motor.maxTorque = -200;
// }
// const motorJoint =this.node.getComponent(cc.MotorJoint);
// motorJoint.connectedBody = otherCollider.node;
// console.error(motorJoint.connectedBody.name);
if (otherCollider.node.name.includes('staticGear')) {
this.rigidBody.angularVelocity = - otherCollider.node.getComponent(cc.RigidBody).angularVelocity;
}
}
onPostSolve(contact, selfCollider, otherCollider) {
this.rigidBody.angularVelocity = 0;
}
onLoad () {
this.initEvent();
this.rigidBody = this.node.getComponent(cc.RigidBody);
// this.motor.connectedBody
this.collider =this.node.getComponent(cc.PhysicsPolygonCollider);
const collisionManager = cc.director.getCollisionManager();
collisionManager.enabled = true;
}
onEnable() {
clientEvent.on('move', this.move, this);
clientEvent.on('moveEnd', this.moveEnd, this);
}
move(dir) {
console.error('move');
this.node.position = dir;
initEvent() {
this.node.on(cc.Node.EventType.TOUCH_START, this._touchStartEvent, this);
this.node.on(cc.Node.EventType.TOUCH_MOVE, this._touchMoveEvent, this);
this.node.on(cc.Node.EventType.TOUCH_END, this._touchEndEvent, this);
this.node.on(cc.Node.EventType.TOUCH_CANCEL, this._touchCancelEvent, this);
}
_touchStartEvent(event: cc.Event.EventTouch) {
this.startPoint = event.getStartLocation();
}
_touchMoveEvent(event: cc.Event.EventTouch) {
// this.points.push(event.getLocation());
// if (this.points.length > 20) {
// this.points.shift();
// }
// const averagePoint = new cc.Vec2(0, 0);
// this.points.forEach((point) => {
// averagePoint.x += point.x;
// averagePoint.y += point.y;
// })
// averagePoint.multiplyScalar(1 / this.points.length);
// const delta = new cc.Vec2(event.getLocation().x - averagePoint.x, event.getLocation().y - averagePoint.y);
// let dir = delta;
let dir = cc.v2(event.getLocation().x - this.startPoint.x, event.getLocation().y - this.startPoint.y);
// clientEvent.dispatchEvent('move', dir);
this.move(dir);
}
onCollsionEnter(other, self) {
console.error('on collision enter');
_touchEndEvent(event: cc.Event.EventTouch) {
// this.points = [];
// clientEvent.dispatchEvent('moveEnd');
}
onCollisionStay(other, self) {
console.error('on collision stay');
_touchCancelEvent(event: cc.Event.EventTouch) {
// clientEvent.dispatchEvent('moveEnd');
this.moveEnd();
}
onCollisionExit(other, self) {
console.error('on collision exit');
move(dir) {
console.error('move');
this.node.position = dir;
// this.rigidBody.awake = true;
cc.director.getPhysicsManager().enabled = false;
}
moveEnd() {
console.error('moveEnd');
cc.director.getPhysicsManager().enabled = true;
}
start () {
}
update (dt) {
// this.rigidBody.angularVelocity = 200;
}
}
{
"ver": "1.0.8",
"uuid": "9f879606-ba84-4e16-b2c9-addf6711c2c0",
"isPlugin": false,
"loadPluginInWeb": true,
"loadPluginInNative": true,
"loadPluginInEditor": false,
"subMetas": {}
}
\ No newline at end of file
// Learn TypeScript:
// - https://docs.cocos.com/creator/manual/en/scripting/typescript.html
// Learn Attribute:
// - https://docs.cocos.com/creator/manual/en/scripting/reference/attributes.html
// Learn life-cycle callbacks:
// - https://docs.cocos.com/creator/manual/en/scripting/life-cycle-callbacks.html
const {ccclass, property} = cc._decorator;
@ccclass
export default class NewClass extends cc.Component {
@property(cc.Label)
label: cc.Label = null;
@property
text: string = 'hello';
startPoint: any;
rigidBody: any;
// LIFE-CYCLE CALLBACKS:
onPreSolve(contact, selfCollider, otherCollider) {
// console.error(otherCollider.node.name);
// if (otherCollider && otherCollider.node.getComponent(cc.MotorJoint)) {
// // this.rigidBody.awake = false;
// console.error(selfCollider.name);
// otherCollider.node.addComponent(cc.MotorJoint);
// const motor = otherCollider.node.getComponent(cc.MotorJoint);
// motor.connectedBody = this.node;
// motor.maxTorque = -200;
// }
// const motorJoint =this.node.getComponent(cc.MotorJoint);
// motorJoint.connectedBody = otherCollider.node;
// console.error(motorJoint.connectedBody.name);
if (otherCollider.node.name.includes('staticGear')) {
this.rigidBody.angularVelocity = - otherCollider.node.getComponent(cc.RigidBody).angularVelocity;
}
}
onPostSolve(contact, selfCollider, otherCollider) {
this.rigidBody.angularVelocity = 0;
}
onLoad () {
this.rigidBody = this.node.getComponent(cc.RigidBody);
this.initEvent();
}
initEvent() {
this.node.on(cc.Node.EventType.TOUCH_START, this._touchStartEvent, this);
this.node.on(cc.Node.EventType.TOUCH_MOVE, this._touchMoveEvent, this);
this.node.on(cc.Node.EventType.TOUCH_END, this._touchEndEvent, this);
this.node.on(cc.Node.EventType.TOUCH_CANCEL, this._touchCancelEvent, this);
}
_touchStartEvent(event: cc.Event.EventTouch) {
this.startPoint = event.getStartLocation();
}
_touchMoveEvent(event: cc.Event.EventTouch) {
// this.points.push(event.getLocation());
// if (this.points.length > 20) {
// this.points.shift();
// }
// const averagePoint = new cc.Vec2(0, 0);
// this.points.forEach((point) => {
// averagePoint.x += point.x;
// averagePoint.y += point.y;
// })
// averagePoint.multiplyScalar(1 / this.points.length);
// const delta = new cc.Vec2(event.getLocation().x - averagePoint.x, event.getLocation().y - averagePoint.y);
// let dir = delta;
let dir = cc.v2(event.getLocation().x - this.startPoint.x, event.getLocation().y - this.startPoint.y);
// clientEvent.dispatchEvent('move', dir);
this.move(dir);
}
_touchEndEvent(event: cc.Event.EventTouch) {
// this.points = [];
// clientEvent.dispatchEvent('moveEnd');
}
_touchCancelEvent(event: cc.Event.EventTouch) {
// clientEvent.dispatchEvent('moveEnd');
this.moveEnd();
}
move(dir) {
console.error('move');
this.node.position = dir;
// this.rigidBody.awake = true;
// cc.director.getPhysicsManager().enabled = false;
}
moveEnd() {
console.error('moveEnd');
// cc.director.getPhysicsManager().enabled = true;
}
start () {
}
// update (dt) {}
}
{
"ver": "1.0.8",
"uuid": "138e0e5a-cd46-4487-92f9-4a66bd9d11bb",
"isPlugin": false,
"loadPluginInWeb": true,
"loadPluginInNative": true,
"loadPluginInEditor": false,
"subMetas": {}
}
\ No newline at end of file
......@@ -30,6 +30,7 @@ export default class NewClass extends cc.Component {
this.node.on(cc.Node.EventType.TOUCH_START, this._touchStartEvent, this);
this.node.on(cc.Node.EventType.TOUCH_MOVE, this._touchMoveEvent, this);
this.node.on(cc.Node.EventType.TOUCH_END, this._touchEndEvent, this);
this.node.on(cc.Node.EventType.TOUCH_CANCEL, this._touchCancelEvent, this);
}
_touchStartEvent(event: cc.Event.EventTouch) {
this.startPoint = event.getStartLocation();
......@@ -48,11 +49,17 @@ export default class NewClass extends cc.Component {
// const delta = new cc.Vec2(event.getLocation().x - averagePoint.x, event.getLocation().y - averagePoint.y);
// let dir = delta;
let dir = cc.v2( event.getLocation().x - this.startPoint.x, event.getLocation().y - this.startPoint.y);
clientEvent.dispatchEvent('move', dir);
let dir = cc.v2(event.getLocation().x - this.startPoint.x, event.getLocation().y - this.startPoint.y);
clientEvent.dispatchEvent('move', dir);
}
_touchEndEvent(event: cc.Event.EventTouch) {
this.points = [];
// clientEvent.dispatchEvent('moveEnd');
}
_touchCancelEvent(event: cc.Event.EventTouch) {
clientEvent.dispatchEvent('moveEnd');
}
start () {
......
......@@ -20,7 +20,7 @@ export default class NewClass extends cc.Component {
onLoad () {
cc.director.getPhysicsManager().enabled = true;
// cc.director.getPhysicsManager().gravity = cc.v2(0,0);
// cc.director.getPhysicsManager().debugDrawFlags = cc.PhysicsManager.DrawBits.e_aabbBit ||cc.PhysicsManager.DrawBits.e_pairBit;
}
start () {
......
{
"ver": "1.0.8",
"uuid": "f69d1b57-9699-436f-9cf3-09745f93e93e",
"uuid": "1a6bc39c-6608-4656-882d-cacbe21425f4",
"isPlugin": false,
"loadPluginInWeb": true,
"loadPluginInNative": true,
......
// Learn TypeScript:
// - https://docs.cocos.com/creator/manual/en/scripting/typescript.html
// Learn Attribute:
// - https://docs.cocos.com/creator/manual/en/scripting/reference/attributes.html
// Learn life-cycle callbacks:
// - https://docs.cocos.com/creator/manual/en/scripting/life-cycle-callbacks.html
const {ccclass, property} = cc._decorator;
@ccclass
export default class NewClass extends cc.Component {
@property(cc.Label)
label: cc.Label = null;
@property
text: string = 'hello';
rigidBody: cc.RigidBody;
// LIFE-CYCLE CALLBACKS:
onPreSolve(contact, selfCollider, otherCollider) {
// console.error(otherCollider.node.name);
// if (otherCollider && otherCollider.node.getComponent(cc.MotorJoint)) {
// // this.rigidBody.awake = false;
// console.error(selfCollider.name);
// otherCollider.node.addComponent(cc.MotorJoint);
// const motor = otherCollider.node.getComponent(cc.MotorJoint);
// motor.connectedBody = this.node;
// motor.maxTorque = -200;
// }
// const motorJoint =this.node.getComponent(cc.MotorJoint);
// motorJoint.connectedBody = otherCollider.node;
// console.error(motorJoint.connectedBody.name);
this.rigidBody.linearVelocity = cc.v2(0, otherCollider.node.getComponent(cc.RigidBody).angularVelocity * 3);
}
onPostSolve(contact, selfCollider, otherCollider) {
this.rigidBody.linearVelocity = cc.v2(0, 0);
}
onLoad () {
this.rigidBody = this.node.getComponent(cc.RigidBody);
}
start () {
}
// update (dt) {}
}
{
"ver": "1.0.8",
"uuid": "0a49bcbd-1294-42d4-a0f3-4f0c351b21f9",
"isPlugin": false,
"loadPluginInWeb": true,
"loadPluginInNative": true,
"loadPluginInEditor": false,
"subMetas": {}
}
\ No newline at end of file
......@@ -17,17 +17,41 @@ export default class NewClass extends cc.Component {
onLoad () {
this.rigidBody = this.node.getComponent(cc.RigidBody);
this.rigidBody.angularVelocity = 100;
// this.motor.connectedBody
this.collider =this.node.getComponent(cc.PhysicsPolygonCollider);
const collisionManager = cc.director.getCollisionManager();
collisionManager.enabled = true;
// this.collider =this.node.getComponent(cc.PhysicsPolygonCollider);
// const collisionManager = cc.director.getCollisionManager();
// collisionManager.enabled = true;
}
onPreSolve(contact, selfCollider, otherCollider) {
// console.error(otherCollider.node.name);
// if (otherCollider && otherCollider.node.getComponent(cc.MotorJoint)) {
// // this.rigidBody.awake = false;
// console.error(selfCollider.name);
// otherCollider.node.addComponent(cc.MotorJoint);
// const motor = otherCollider.node.getComponent(cc.MotorJoint);
// motor.connectedBody = this.node;
// motor.maxTorque = -200;
// }
// const motorJoint =this.node.getComponent(cc.MotorJoint);
// motorJoint.connectedBody = otherCollider.node;
// console.error(motorJoint.connectedBody.name);
this.rigidBody.linearVelocity =cc.v2(0,0);
if (otherCollider.node.name.includes('dynamicGear')) {
this.rigidBody.angularVelocity = - 200 //otherCollider.node.getComponent(cc.RigidBody).angularVelocity;
}
}
onPostSolve(contact, selfCollider, otherCollider) {
this.rigidBody.angularVelocity = 0;
}
start () {
}
update (dt) {
this.rigidBody.angularVelocity = 200;
// this.rigidBody.angularVelocity = 200;
}
}
{
"ver": "1.0.8",
"uuid": "554ac137-1b5a-4236-b378-ff4687c6fa27",
"isPlugin": false,
"loadPluginInWeb": true,
"loadPluginInNative": true,
"loadPluginInEditor": false,
"subMetas": {}
}
\ No newline at end of file
// Learn TypeScript:
// - https://docs.cocos.com/creator/manual/en/scripting/typescript.html
// Learn Attribute:
// - https://docs.cocos.com/creator/manual/en/scripting/reference/attributes.html
// Learn life-cycle callbacks:
// - https://docs.cocos.com/creator/manual/en/scripting/life-cycle-callbacks.html
const {ccclass, property} = cc._decorator;
@ccclass
export default class NewClass extends cc.Component {
// LIFE-CYCLE CALLBACKS:
// onLoad () {}
start () {
}
// update (dt) {}
}
{
"ver": "1.0.8",
"uuid": "52b3c557-d3a4-44e2-9487-5d31c5d33000",
"isPlugin": false,
"loadPluginInWeb": true,
"loadPluginInNative": true,
"loadPluginInEditor": false,
"subMetas": {}
}
\ No newline at end of file
......@@ -13670,7 +13670,17 @@ declare namespace cc {
}
/** !#en Representation of 2D vectors and points.
!#zh 表示 2D 向量和坐标 */
export class Vec2 extends ValueType {
export class Vec2 extends ValueType {
push(arg0: Vec2) {
throw new Error("Method not implemented.");
}
length: number;
shift() {
throw new Error("Method not implemented.");
}
forEach(arg0: (point: any) => void) {
throw new Error("Method not implemented.");
}
/**
!#en Returns the length of this vector.
!#zh 返回该向量的长度。
......@@ -19272,33 +19282,34 @@ declare namespace cc {
*****************************************************/
export namespace PhysicsManager {
/** !#en
The draw bits for drawing physics debug information.<br>
example:<br>
```js
cc.director.getPhysicsManager().debugDrawFlags =
// cc.PhysicsManager.DrawBits.e_aabbBit |
// cc.PhysicsManager.DrawBits.e_pairBit |
// cc.PhysicsManager.DrawBits.e_centerOfMassBit |
cc.PhysicsManager.DrawBits.e_jointBit |
cc.PhysicsManager.DrawBits.e_shapeBit;
```
!#zh
指定物理系统需要绘制哪些调试信息。<br>
example:<br>
```js
cc.director.getPhysicsManager().debugDrawFlags =
// cc.PhysicsManager.DrawBits.e_aabbBit |
// cc.PhysicsManager.DrawBits.e_pairBit |
// cc.PhysicsManager.DrawBits.e_centerOfMassBit |
cc.PhysicsManager.DrawBits.e_jointBit |
cc.PhysicsManager.DrawBits.e_shapeBit;
``` */
export enum DrawBits {
e_aabbBit = 0,
e_jointBit = 0,
e_shapeBit = 0,
}
/** !#en
The draw bits for drawing physics debug information.<br>
example:<br>
```js
cc.director.getPhysicsManager().debugDrawFlags =
// cc.PhysicsManager.DrawBits.e_aabbBit |
// cc.PhysicsManager.DrawBits.e_pairBit |
// cc.PhysicsManager.DrawBits.e_centerOfMassBit |
cc.PhysicsManager.DrawBits.e_jointBit |
cc.PhysicsManager.DrawBits.e_shapeBit;
```
!#zh
指定物理系统需要绘制哪些调试信息。<br>
example:<br>
```js
cc.director.getPhysicsManager().debugDrawFlags =
// cc.PhysicsManager.DrawBits.e_aabbBit |
// cc.PhysicsManager.DrawBits.e_pairBit |
// cc.PhysicsManager.DrawBits.e_centerOfMassBit |
cc.PhysicsManager.DrawBits.e_jointBit |
cc.PhysicsManager.DrawBits.e_shapeBit;
``` */
export enum DrawBits {
e_aabbBit = 0,
e_jointBit = 0,
e_shapeBit = 0,
e_pairBit
}
}
/****************************************************
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 sign in to comment