| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394 |
- const ColliderSpeedUpPoint = ({
- None:0,
- FrontAccelerationBand:80,
- AccelerationBandCenter:150,
- BehindAccelerationBand:80,
- PreHurdleBand:200,
- PerfectHurdleBand:220,
- FrontLongAccelerationBand:80,
- CenterLongAccelerationBand:5,
- FrontLongJumpBand:80,
- PerfectLongJumpBand:150,
- });
- const ZoneType = cc.Enum ({
- None:0,
- FrontAccelerationBand:1,
- AccelerationBandCenter:2,
- BehindAccelerationBand:3,
- PreHurdleBand:4,
- PerfectHurdleBand:5,
- FrontLongAccelerationBand:6,
- CenterLongAccelerationBand:7,
- BehindLongAccelerationBand:8,
- FrontLongJumpBand:9,
- PerfectLongJumpBand:10,
- });
- const SpeedRangeForAnimation = ({
- SlowSpeed:[0,300],
- MiddleSpeed:[300,600],
- HightSpeed:[600,1500],
- });
- // 7920
- // 20880
- // 34560
- // 54000
- // 64076.4
- cc.Class({
- extends: cc.Component,
- properties: {
- CurrentInZoneType : {
- default : ZoneType.None,
- type : cc.Enum(ZoneType)
- },
- BTouchedScreenInTheZone:false,
- BTouchedScreenInTheZone_jumpLong:false,
- BStagger:false,
- AccelerationBandCenterTouched:null,
- InitialPositionY:0,
- InitialSpeed:300,
- CurrentSpeed:300,
- MaxSpeed:800,
- BDrawYellowLine:false,
- Barrier:null,
- enableTouch:true,
- TouchControlEnableTouch:true,
- StayInFrontLongAccelerationBand:null,
- SyschroAtionArray:[],
- HeroPositionX:0,
- HeroCurrentSpeed:0,
- //终点加分 todo
- TerminalPoint:0,
- //才到家俗点
- AchievementPoint:1,
- EndDistance:0,//最终的距离
- JumpTimer:0,//跳远用到的时间
- AtStartLinePositionX:0,
- StartLineStopPositionArray:[],
- FinishLineReduceSpeedPositionArray:[],
- JavePositionArray_Hero:[],
- JavePositionArray_Rivel:[]
- },
- onLoad ()
- {
- this.BTouchedScreenInTheZone =false;
- this.MaxSpeed=900;
- },
- start()
- {
- this.HeroPositionX = this.node.position.x;
- this.HeroCurrentSpeed = this.CurrentSpeed;
- this.CurrentInZoneType = 0;
- this.FinishLineReduceSpeedPositionArray=[];
- this.JavePositionArray_Hero=[];
- this.JavePositionArray_Rivel=[];
- }
- });
- module.exports = {
- ColliderSpeedUpPoint : ColliderSpeedUpPoint,
- ZoneType :cc.Enum(ZoneType),
- SpeedRangeForAnimation:SpeedRangeForAnimation,
- };
|