DeprecatedCocos2dFunc.lua
38.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
--tip
local function deprecatedTip(old_name,new_name)
print("\n********** \n"..old_name.." was deprecated please use ".. new_name .. " instead.\n**********")
end
--functions of CCDirector will be deprecated,begin
local CCDirectorDeprecated = { }
function CCDirectorDeprecated.sharedDirector()
deprecatedTip("CCDirector:sharedDirector","cc.Director:getInstance")
return cc.Director:getInstance()
end
CCDirector.sharedDirector = CCDirectorDeprecated.sharedDirector
--functions of CCDirector will be deprecated,end
--functions of CCTextureCache will be deprecated begin
local TextureCacheDeprecated = {}
function TextureCacheDeprecated.getInstance(self)
deprecatedTip("cc.TextureCache:getInstance","cc.Director:getInstance():getTextureCache")
return cc.Director:getInstance():getTextureCache()
end
cc.TextureCache.getInstance = TextureCacheDeprecated.getInstance
function TextureCacheDeprecated.destroyInstance(self)
deprecatedTip("cc.TextureCache:destroyInstance","cc.Director:getInstance():destroyTextureCache")
return cc.Director:getInstance():destroyTextureCache()
end
cc.TextureCache.destroyInstance = TextureCacheDeprecated.destroyInstance
function TextureCacheDeprecated.dumpCachedTextureInfo(self)
deprecatedTip("self:dumpCachedTextureInfo","self:getCachedTextureInfo")
return print(self:getCachedTextureInfo())
end
cc.TextureCache.dumpCachedTextureInfo = TextureCacheDeprecated.dumpCachedTextureInfo
local CCTextureCacheDeprecated = { }
function CCTextureCacheDeprecated.sharedTextureCache()
deprecatedTip("CCTextureCache:sharedTextureCache","CCTextureCache:getInstance")
return cc.TextureCache:getInstance()
end
rawset(CCTextureCache,"sharedTextureCache",CCTextureCacheDeprecated.sharedTextureCache)
function CCTextureCacheDeprecated.purgeSharedTextureCache()
deprecatedTip("CCTextureCache:purgeSharedTextureCache","CCTextureCache:destroyInstance")
return cc.TextureCache:destroyInstance()
end
rawset(CCTextureCache,"purgeSharedTextureCache",CCTextureCacheDeprecated.purgeSharedTextureCache)
function CCTextureCacheDeprecated.addUIImage(self, image, key)
deprecatedTip("CCTextureCache:addUIImage","CCTextureCache:addImage")
return self:addImage(image,key)
end
CCTextureCache.addUIImage = CCTextureCacheDeprecated.addUIImage
--functions of CCTextureCache will be deprecated end
--functions of CCAnimation will be deprecated begin
local CCAnimationDeprecated = {}
function CCAnimationDeprecated.addSpriteFrameWithFileName(self,...)
deprecatedTip("CCAnimationDeprecated:addSpriteFrameWithFileName","cc.Animation:addSpriteFrameWithFile")
return self:addSpriteFrameWithFile(...)
end
CCAnimation.addSpriteFrameWithFileName = CCAnimationDeprecated.addSpriteFrameWithFileName
--functions of CCAnimation will be deprecated end
--functions of CCAnimationCache will be deprecated begin
local CCAnimationCacheDeprecated = { }
function CCAnimationCacheDeprecated.sharedAnimationCache()
deprecatedTip("CCAnimationCache:sharedAnimationCache","CCAnimationCache:getInstance")
return CCAnimationCache:getInstance()
end
CCAnimationCache.sharedAnimationCache = CCAnimationCacheDeprecated.sharedAnimationCache
function CCAnimationCacheDeprecated.purgeSharedAnimationCache()
deprecatedTip("CCAnimationCache:purgeSharedAnimationCache","CCAnimationCache:destroyInstance")
return CCAnimationCache:destroyInstance()
end
CCAnimationCache.purgeSharedAnimationCache = CCAnimationCacheDeprecated.purgeSharedAnimationCache
function CCAnimationCacheDeprecated.addAnimationsWithFile(self,...)
deprecatedTip("CCAnimationCache:addAnimationsWithFile","cc.AnimationCache:addAnimations")
return self:addAnimations(...)
end
CCAnimationCache.addAnimationsWithFile = CCAnimationCacheDeprecated.addAnimationsWithFile
function CCAnimationCacheDeprecated.animationByName(self,...)
deprecatedTip("CCAnimationCache:animationByName","cc.AnimationCache:getAnimation")
return self:getAnimation(...)
end
CCAnimationCache.animationByName = CCAnimationCacheDeprecated.animationByName
function CCAnimationCacheDeprecated.removeAnimationByName(self)
deprecatedTip("CCAnimationCache:removeAnimationByName","cc.AnimationCache:removeAnimation")
return self:removeAnimation()
end
CCAnimationCache.removeAnimationByName = CCAnimationCacheDeprecated.removeAnimationByName
--functions of CCAnimationCache will be deprecated end
--functions of CCFileUtils will be deprecated end
local CCFileUtilsDeprecated = { }
function CCFileUtilsDeprecated.sharedFileUtils()
deprecatedTip("CCFileUtils:sharedFileUtils","CCFileUtils:getInstance")
return cc.FileUtils:getInstance()
end
CCFileUtils.sharedFileUtils = CCFileUtilsDeprecated.sharedFileUtils
function CCFileUtilsDeprecated.purgeFileUtils()
deprecatedTip("CCFileUtils:purgeFileUtils","CCFileUtils:destroyInstance")
return cc.FileUtils:destroyInstance()
end
CCFileUtils.purgeFileUtils = CCFileUtilsDeprecated.purgeFileUtils
--functions of CCFileUtils will be deprecated end
--functions of CCMenu will be deprecated begin
local CCMenuDeprecated = { }
function CCMenuDeprecated.createWithItem(self,...)
deprecatedTip("CCMenuDeprecated:createWithItem","cc.Menu:createWithItem")
return self:create(...)
end
CCMenu.createWithItem = CCMenuDeprecated.createWithItem
function CCMenuDeprecated.setHandlerPriority(self)
print("\n********** \n".."setHandlerPriority was deprecated in 3.0. \n**********")
end
CCMenu.setHandlerPriority = CCMenuDeprecated.setHandlerPriority
--functions of CCMenu will be deprecated end
--functions of CCNode will be deprecated begin
local CCNodeDeprecated = { }
function CCNodeDeprecated.boundingBox(self)
deprecatedTip("CCNode:boundingBox","cc.Node:getBoundingBox")
return self:getBoundingBox()
end
CCNode.boundingBox = CCNodeDeprecated.boundingBox
function CCNodeDeprecated.numberOfRunningActions(self)
deprecatedTip("CCNode:numberOfRunningActions","cc.Node:getNumberOfRunningActions")
return self:getNumberOfRunningActions()
end
CCNode.numberOfRunningActions = CCNodeDeprecated.numberOfRunningActions
function CCNodeDeprecated.removeFromParentAndCleanup(self,...)
deprecatedTip("CCNode:removeFromParentAndCleanup","cc.Node:removeFromParent")
return self:removeFromParent(...)
end
CCNode.removeFromParentAndCleanup = CCNodeDeprecated.removeFromParentAndCleanup
--functions of CCNode will be deprecated end
--CCDrawPrimitives will be deprecated begin
local function CCDrawPrimitivesClassDeprecated()
deprecatedTip("CCDrawPrimitives","cc.DrawPrimitives")
return cc.DrawPrimitives
end
_G.CCDrawPrimitives = CCDrawPrimitivesClassDeprecated()
--functions of CCDrawPrimitives will be deprecated begin
local CCDrawPrimitivesDeprecated = { }
function CCDrawPrimitivesDeprecated.ccDrawPoint(pt)
deprecatedTip("ccDrawPoint","cc.DrawPrimitives.drawPoint")
return cc.DrawPrimitives.drawPoint(pt)
end
_G.ccDrawPoint = CCDrawPrimitivesDeprecated.ccDrawPoint
function CCDrawPrimitivesDeprecated.ccDrawLine(origin,destination)
deprecatedTip("ccDrawLine","cc.DrawPrimitives.drawLine")
return cc.DrawPrimitives.drawLine(origin,destination)
end
_G.ccDrawLine = CCDrawPrimitivesDeprecated.ccDrawLine
function CCDrawPrimitivesDeprecated.ccDrawRect(origin,destination)
deprecatedTip("ccDrawRect","cc.DrawPrimitives.drawRect")
return cc.DrawPrimitives.drawRect(origin,destination)
end
_G.ccDrawRect = CCDrawPrimitivesDeprecated.ccDrawRect
function CCDrawPrimitivesDeprecated.ccDrawSolidRect(origin,destination,color)
deprecatedTip("ccDrawSolidRect","cc.DrawPrimitives.drawSolidRect")
return cc.DrawPrimitives.drawSolidRect(origin,destination,color)
end
_G.ccDrawSolidRect = CCDrawPrimitivesDeprecated.ccDrawSolidRect
-- params:... may represent two param(xScale,yScale) or nil
function CCDrawPrimitivesDeprecated.ccDrawCircle(center,radius,angle,segments,drawLineToCenter,...)
deprecatedTip("ccDrawCircle","cc.DrawPrimitives.drawCircle")
return cc.DrawPrimitives.drawCircle(center,radius,angle,segments,drawLineToCenter,...)
end
_G.ccDrawCircle = CCDrawPrimitivesDeprecated.ccDrawCircle
-- params:... may represent two param(xScale,yScale) or nil
function CCDrawPrimitivesDeprecated.ccDrawSolidCircle(center,radius,angle,segments,...)
deprecatedTip("ccDrawSolidCircle","cc.DrawPrimitives.drawSolidCircle")
return cc.DrawPrimitives.drawSolidCircle(center,radius,angle,segments,...)
end
_G.ccDrawSolidCircle = CCDrawPrimitivesDeprecated.ccDrawSolidCircle
function CCDrawPrimitivesDeprecated.ccDrawQuadBezier(origin,control,destination,segments)
deprecatedTip("ccDrawQuadBezier","cc.DrawPrimitives.drawQuadBezier")
return cc.DrawPrimitives.drawQuadBezier(origin,control,destination,segments)
end
_G.ccDrawQuadBezier = CCDrawPrimitivesDeprecated.ccDrawQuadBezier
function CCDrawPrimitivesDeprecated.ccDrawCubicBezier(origin,control1,control2,destination,segments)
deprecatedTip("ccDrawCubicBezier","cc.DrawPrimitives.drawCubicBezier")
return cc.DrawPrimitives.drawCubicBezier(origin,control1,control2,destination,segments)
end
_G.ccDrawCubicBezier = CCDrawPrimitivesDeprecated.ccDrawCubicBezier
function CCDrawPrimitivesDeprecated.ccDrawCatmullRom(arrayOfControlPoints,segments)
deprecatedTip("ccDrawCatmullRom","cc.DrawPrimitives.drawCatmullRom")
return cc.DrawPrimitives.drawCatmullRom(arrayOfControlPoints,segments)
end
_G.ccDrawCatmullRom = CCDrawPrimitivesDeprecated.ccDrawCatmullRom
function CCDrawPrimitivesDeprecated.ccDrawCardinalSpline(config,tension,segments)
deprecatedTip("ccDrawCardinalSpline","cc.DrawPrimitives.drawCardinalSpline")
return cc.DrawPrimitives.drawCardinalSpline(config,tension,segments)
end
_G.ccDrawCardinalSpline = CCDrawPrimitivesDeprecated.ccDrawCardinalSpline
function CCDrawPrimitivesDeprecated.ccDrawColor4B(r,g,b,a)
deprecatedTip("ccDrawColor4B","cc.DrawPrimitives.drawColor4B")
return cc.DrawPrimitives.drawColor4B(r,g,b,a)
end
_G.ccDrawColor4B = CCDrawPrimitivesDeprecated.ccDrawColor4B
function CCDrawPrimitivesDeprecated.ccDrawColor4F(r,g,b,a)
deprecatedTip("ccDrawColor4F","cc.DrawPrimitives.drawColor4F")
return cc.DrawPrimitives.drawColor4F(r,g,b,a)
end
_G.ccDrawColor4F = CCDrawPrimitivesDeprecated.ccDrawColor4F
function CCDrawPrimitivesDeprecated.ccPointSize(pointSize)
deprecatedTip("ccPointSize","cc.DrawPrimitives.setPointSize")
return cc.DrawPrimitives.setPointSize(pointSize)
end
_G.ccPointSize = CCDrawPrimitivesDeprecated.ccPointSize
--functions of CCDrawPrimitives will be deprecated end
--CCDrawPrimitives will be deprecated end
local CCProgressTimerDeprecated = {}
function CCProgressTimerDeprecated.setReverseProgress(self,...)
deprecatedTip("CCProgressTimer","CCProgressTimer:setReverseDirection")
return self:setReverseDirection(...)
end
CCProgressTimer.setReverseProgress = CCProgressTimerDeprecated.setReverseProgress
--functions of CCSpriteFrameCache will be deprecated begin
local CCSpriteFrameCacheDeprecated = { }
function CCSpriteFrameCacheDeprecated.spriteFrameByName(self,szName)
deprecatedTip("CCSpriteFrameCache:spriteFrameByName","CCSpriteFrameCache:getSpriteFrameByName")
return self:getSpriteFrameByName(szName)
end
CCSpriteFrameCache.spriteFrameByName = CCSpriteFrameCacheDeprecated.spriteFrameByName
function CCSpriteFrameCacheDeprecated.sharedSpriteFrameCache()
deprecatedTip("CCSpriteFrameCache:sharedSpriteFrameCache","CCSpriteFrameCache:getInstance")
return CCSpriteFrameCache:getInstance()
end
CCSpriteFrameCache.sharedSpriteFrameCache = CCSpriteFrameCacheDeprecated.sharedSpriteFrameCache
function CCSpriteFrameCacheDeprecated.purgeSharedSpriteFrameCache()
deprecatedTip("CCSpriteFrameCache:purgeSharedSpriteFrameCache","CCSpriteFrameCache:destroyInstance")
return CCSpriteFrameCache:destroyInstance()
end
CCSpriteFrameCache.purgeSharedSpriteFrameCache = CCSpriteFrameCacheDeprecated.purgeSharedSpriteFrameCache
function CCSpriteFrameCacheDeprecated.addSpriteFramesWithFile(self,...)
deprecatedTip("CCSpriteFrameCache:addSpriteFramesWithFile","CCSpriteFrameCache:addSpriteFrames")
return self:addSpriteFrames(...)
end
rawset(CCSpriteFrameCache,"addSpriteFramesWithFile",CCSpriteFrameCacheDeprecated.addSpriteFramesWithFile)
function CCSpriteFrameCacheDeprecated.getSpriteFrameByName(self,...)
deprecatedTip("CCSpriteFrameCache:getSpriteFrameByName","CCSpriteFrameCache:getSpriteFrame")
return self:getSpriteFrame(...)
end
CCSpriteFrameCache.getSpriteFrameByName = CCSpriteFrameCacheDeprecated.getSpriteFrameByName
--functions of CCSpriteFrameCache will be deprecated end
--functions of CCLabelAtlas will be deprecated begin
local CCLabelAtlasDeprecated = {}
function CCLabelAtlasDeprecated.create(self,...)
deprecatedTip("CCLabelAtlas:create","CCLabelAtlas:_create")
return self:_create(...)
end
CCLabelAtlas.create = CCLabelAtlasDeprecated.create
--functions of CCLabelAtlas will be deprecated end
---------------------------
--global functions wil be deprecated, begin
local function CCRectMake(x,y,width,height)
deprecatedTip("CCRectMake(x,y,width,height)","cc.rect(x,y,width,height) in lua")
return cc.rect(x,y,width,height)
end
_G.CCRectMake = CCRectMake
local function ccc3(r,g,b)
deprecatedTip("ccc3(r,g,b)","cc.c3b(r,g,b)")
return cc.c3b(r,g,b)
end
_G.ccc3 = ccc3
local function ccp(x,y)
deprecatedTip("ccp(x,y)","cc.p(x,y)")
return cc.p(x,y)
end
_G.ccp = ccp
local function CCSizeMake(width,height)
deprecatedTip("CCSizeMake(width,height)","cc.size(width,height)")
return cc.size(width,height)
end
_G.CCSizeMake = CCSizeMake
local function ccc4(r,g,b,a)
deprecatedTip("ccc4(r,g,b,a)","cc.c4b(r,g,b,a)")
return cc.c4b(r,g,b,a)
end
_G.ccc4 = ccc4
local function ccc4FFromccc3B(color3B)
deprecatedTip("ccc4FFromccc3B(color3B)","cc.c4f(color3B.r / 255.0,color3B.g / 255.0,color3B.b / 255.0,1.0)")
return cc.c4f(color3B.r/255.0, color3B.g/255.0, color3B.b/255.0, 1.0)
end
_G.ccc4FFromccc3B = ccc4FFromccc3B
local function ccc4f(r,g,b,a)
deprecatedTip("ccc4f(r,g,b,a)","cc.c4f(r,g,b,a)")
return cc.c4f(r,g,b,a)
end
_G.ccc4f = ccc4f
local function ccc4FFromccc4B(color4B)
deprecatedTip("ccc4FFromccc4B(color4B)","cc.c4f(color4B.r/255.0, color4B.g/255.0, color4B.b/255.0, color4B.a/255.0)")
return cc.c4f(color4B.r/255.0, color4B.g/255.0, color4B.b/255.0, color4B.a/255.0)
end
_G.ccc4FFromccc4B = ccc4FFromccc4B
local function ccc4FEqual(a,b)
deprecatedTip("ccc4FEqual(a,b)","a:equals(b)")
return a:equals(b)
end
_G.ccc4FEqual = ccc4FEqual
--global functions wil be deprecated, end
--functions of _G will be deprecated begin
local function ccpLineIntersect(a,b,c,d,s,t)
deprecatedTip("ccpLineIntersect","cc.pIsLineIntersect")
return cc.pIsLineIntersect(a,b,c,d,s,t)
end
_G.ccpLineIntersect = ccpLineIntersect
local function CCPointMake(x,y)
deprecatedTip("CCPointMake(x,y)","cc.p(x,y)")
return cc.p(x,y)
end
_G.CCPointMake = CCPointMake
local function ccpNeg(pt)
deprecatedTip("ccpNeg","cc.pSub")
return cc.pSub({x = 0,y = 0}, pt)
end
_G.ccpNeg = ccpNeg
local function ccpAdd(pt1,pt2)
deprecatedTip("ccpAdd","cc.pAdd")
return cc.pAdd(pt1,pt2)
end
_G.ccpAdd = ccpAdd
local function ccpSub(pt1,pt2)
deprecatedTip("ccpSub","cc.pSub")
return cc.pSub(pt1,pt2)
end
_G.ccpSub = ccpSub
local function ccpMult(pt,factor)
deprecatedTip("ccpMult","cc.pMul")
return cc.pMul(pt,factor)
end
_G.ccpMult = ccpMult
local function ccpMidpoint(pt1,pt2)
deprecatedTip("ccpMidpoint","cc.pMidpoint")
return cc.pMidpoint(pt1,pt2)
end
_G.ccpMidpoint = ccpMidpoint
local function ccpDot(pt1,pt2)
deprecatedTip("ccpDot","cc.pDot")
return cc.pDot(pt1,pt2)
end
_G.ccpDot = ccpDot
local function ccpCross(pt1,pt2)
deprecatedTip("ccpCross","cc.pCross")
return cc.pCross(pt1, pt2)
end
_G.ccpCross = ccpCross
local function ccpPerp(pt)
deprecatedTip("ccpPerp","cc.pPerp")
return cc.pPerp(pt)
end
_G.ccpPerp = ccpPerp
local function ccpRPerp(pt)
deprecatedTip("ccpRPerp","cc.RPerp")
return cc.RPerp(pt)
end
_G.ccpRPerp = ccpRPerp
local function ccpProject(pt1,pt2)
deprecatedTip("ccpProject","cc.pProject")
return cc.pProject(pt1,pt2)
end
_G.ccpProject = ccpProject
local function ccpRotate(pt1,pt2)
deprecatedTip("ccpRotate","cc.pRotate")
return cc.pRotate(pt1,pt2)
end
_G.ccpRotate = ccpRotate
local function ccpUnrotate(pt1,pt2)
deprecatedTip("ccpUnrotate","cc.pUnrotate")
return cc.pUnrotate(pt1,pt2)
end
_G.ccpUnrotate = ccpUnrotate
local function ccpLengthSQ(pt)
deprecatedTip("ccpLengthSQ","cc.pLengthSQ")
return cc.pLengthSQ(pt)
end
_G.ccpLengthSQ = ccpLengthSQ
local function ccpDistanceSQ(pt1,pt2)
deprecatedTip("ccpDistanceSQ","cc.pDistanceSQ")
return cc.pDistanceSQ(pt1,pt2)
end
_G.ccpDistanceSQ = ccpDistanceSQ
local function ccpLength(pt)
deprecatedTip("ccpLength","cc.pGetLength")
return cc.pGetLength(pt)
end
_G.ccpLength = ccpLength
local function ccpDistance(pt1,pt2)
deprecatedTip("ccpDistance","cc.pGetDistance")
return cc.pGetDistance(pt1, pt2)
end
_G.ccpDistance = ccpDistance
local function ccpNormalize(pt)
deprecatedTip("ccpNormalize","cc.pNormalize")
return cc.pNormalize(pt)
end
_G.ccpNormalize = ccpNormalize
local function ccpForAngle(angle)
deprecatedTip("ccpForAngle","cc.pForAngle")
return cc.pForAngle(angle)
end
_G.ccpForAngle = ccpForAngle
local function ccpToAngle(pt)
deprecatedTip("ccpToAngle","cc.pToAngleSelf")
return cc.pToAngleSelf(pt)
end
_G.ccpToAngle = ccpToAngle
local function ccpClamp(pt1,pt2,pt3)
deprecatedTip("ccpClamp","cc.pGetClampPoint")
return cc.pGetClampPoint(pt1,pt2,pt3)
end
_G.ccpClamp = ccpClamp
local function ccpFromSize(sz)
deprecatedTip("ccpFromSize(sz)","cc.pFromSize")
return cc.pFromSize(sz)
end
_G.ccpFromSize = ccpFromSize
local function ccpLerp(pt1,pt2,alpha)
deprecatedTip("ccpLerp","cc.pLerp")
return cc.pLerp(pt1,pt2,alpha)
end
_G.ccpLerp = ccpLerp
local function ccpFuzzyEqual(pt1,pt2,variance)
deprecatedTip("ccpFuzzyEqual","cc.pFuzzyEqual")
return cc.pFuzzyEqual(pt1,pt2,variance)
end
_G.ccpFuzzyEqual = ccpFuzzyEqual
local function ccpCompMult(pt1,pt2)
deprecatedTip("ccpCompMult","cc.p")
return cc.p(pt1.x * pt2.x , pt1.y * pt2.y)
end
_G.ccpCompMult = ccpCompMult
local function ccpAngleSigned(pt1,pt2)
deprecatedTip("ccpAngleSigned","cc.pGetAngle")
return cc.pGetAngle(pt1, pt2)
end
_G.ccpAngleSigned = ccpAngleSigned
local function ccpAngle(pt1,pt2)
deprecatedTip("ccpAngle","cc.pGetAngle")
return cc.pGetAngle(pt1,ptw)
end
_G.ccpAngle = ccpAngle
local function ccpRotateByAngle(pt1,pt2,angle)
deprecatedTip("ccpRotateByAngle","cc.pRotateByAngle")
return cc.pRotateByAngle(pt1, pt2, angle)
end
_G.ccpRotateByAngle = ccpRotateByAngle
local function ccpSegmentIntersect(pt1,pt2,pt3,pt4)
deprecatedTip("ccpSegmentIntersect","cc.pIsSegmentIntersect")
return cc.pIsSegmentIntersect(pt1,pt2,pt3,pt4)
end
_G.ccpSegmentIntersect = ccpSegmentIntersect
local function ccpIntersectPoint(pt1,pt2,pt3,pt4)
deprecatedTip("ccpIntersectPoint","cc.pGetIntersectPoint")
return cc.pGetIntersectPoint(pt1,pt2,pt3,pt4)
end
_G.ccpIntersectPoint = ccpIntersectPoint
local function vertex2(x,y)
deprecatedTip("vertex2(x,y)","cc.vertex2F(x,y)")
return cc.vertex2F(x,y)
end
_G.vertex2 = vertex2
local function vertex3(x,y,z)
deprecatedTip("vertex3(x,y,z)","cc.Vertex3F(x,y,z)")
return cc.Vertex3F(x,y,z)
end
_G.vertex3 = vertex3
local function tex2(u,v)
deprecatedTip("tex2(u,v)","cc.tex2f(u,v)")
return cc.tex2f(u,v)
end
_G.tex2 = tex2
local function ccc4BFromccc4F(color4F)
deprecatedTip("ccc4BFromccc4F(color4F)","Color4B(color4F.r * 255.0, color4F.g * 255.0, color4F.b * 255.0, color4B.a * 255.0)")
return Color4B(color4F.r * 255.0, color4F.g * 255.0, color4F.b * 255.0, color4B.a * 255.0)
end
_G.ccc4BFromccc4F = ccc4BFromccc4F
local function ccColor3BDeprecated()
deprecatedTip("ccColor3B","cc.c3b(0,0,0)")
return cc.c3b(0,0,0)
end
_G.ccColor3B = ccColor3BDeprecated
local function ccColor4BDeprecated()
deprecatedTip("ccColor4B","cc.c4b(0,0,0,0)")
return cc.c4b(0,0,0,0)
end
_G.ccColor4B = ccColor4BDeprecated
local function ccColor4FDeprecated()
deprecatedTip("ccColor4F","cc.c4f(0.0,0.0,0.0,0.0)")
return cc.c4f(0.0,0.0,0.0,0.0)
end
_G.ccColor4F = ccColor4FDeprecated
local function ccVertex2FDeprecated()
deprecatedTip("ccVertex2F","cc.vertex2F(0.0,0.0)")
return cc.vertex2F(0.0,0.0)
end
_G.ccVertex2F = ccVertex2FDeprecated
local function ccVertex3FDeprecated()
deprecatedTip("ccVertex3F","cc.Vertex3F(0.0, 0.0, 0.0)")
return cc.Vertex3F(0.0, 0.0, 0.0)
end
_G.ccVertex3F = ccVertex3FDeprecated
local function ccTex2FDeprecated()
deprecatedTip("ccTex2F","cc.tex2F(0.0, 0.0)")
return cc.tex2F(0.0, 0.0)
end
_G.ccTex2F = ccTex2FDeprecated
local function ccPointSpriteDeprecated()
deprecatedTip("ccPointSprite","cc.PointSprite(cc.vertex2F(0.0, 0.0),cc.c4b(0.0, 0.0, 0.0),0)")
return cc.PointSprite(cc.vertex2F(0.0, 0.0),cc.c4b(0.0, 0.0, 0.0),0)
end
_G.ccPointSprite = ccPointSpriteDeprecated
local function ccQuad2Deprecated()
deprecatedTip("ccQuad2","cc.Quad2(cc.vertex2F(0.0, 0.0), cc.vertex2F(0.0, 0.0), cc.vertex2F(0.0, 0.0), cc.vertex2F(0.0, 0.0))")
return cc.Quad2(cc.vertex2F(0.0, 0.0), cc.vertex2F(0.0, 0.0), cc.vertex2F(0.0, 0.0), cc.vertex2F(0.0, 0.0))
end
_G.ccQuad2 = ccQuad2Deprecated
local function ccQuad3Deprecated()
deprecatedTip("ccQuad3","cc.Quad3(cc.Vertex3F(0.0, 0.0 ,0.0), cc.Vertex3F(0.0, 0.0 ,0.0), cc.Vertex3F(0.0, 0.0 ,0.0), cc.Vertex3F(0.0, 0.0 ,0.0))")
return cc.Quad3(cc.Vertex3F(0.0, 0.0 ,0.0), cc.Vertex3F(0.0, 0.0 ,0.0), cc.Vertex3F(0.0, 0.0 ,0.0), cc.Vertex3F(0.0, 0.0 ,0.0))
end
_G.ccQuad3 = ccQuad3Deprecated
local function ccV2FC4BT2FDeprecated()
deprecatedTip("ccV2F_C4B_T2F","cc.V2F_C4B_T2F(cc.vertex2F(0.0, 0.0), cc.c4b(0 , 0, 0, 0 ), cc.tex2F(0.0, 0.0))")
return cc.V2F_C4B_T2F(cc.vertex2F(0.0, 0.0), cc.c4b(0 , 0, 0, 0 ), cc.tex2F(0.0, 0.0))
end
_G.ccV2F_C4B_T2F = ccV2FC4BT2FDeprecated
local function ccV2FC4FT2FDeprecated()
deprecatedTip("ccV2F_C4F_T2F","cc.V2F_C4F_T2F(cc.vertex2F(0.0, 0.0), cc.c4f(0.0 , 0.0 , 0.0 , 0.0 ), cc.tex2F(0.0, 0.0))")
return cc.V2F_C4F_T2F(cc.vertex2F(0.0, 0.0), cc.c4f(0.0 , 0.0 , 0.0 , 0.0), cc.tex2F(0.0, 0.0))
end
_G.ccV2F_C4F_T2F = ccV2FC4FT2FDeprecated
local function ccV3FC4BT2FDeprecated()
deprecatedTip("ccV3F_C4B_T2F","cc.V3F_C4B_T2F(cc.vertex3F(0.0, 0.0, 0.0), cc.c4b(0 , 0 , 0, 0 ), cc.tex2F(0.0, 0.0))")
return cc.V3F_C4B_T2F(cc.vertex3F(0.0, 0.0, 0.0), cc.c4b(0 , 0 , 0, 0 ), cc.tex2F(0.0, 0.0))
end
_G.ccV3F_C4B_T2F = ccV3FC4BT2FDeprecated
local function ccV2FC4BT2FQuadDeprecated()
deprecatedTip("ccV2F_C4B_T2F_Quad","cc.V2F_C4B_T2F_Quad(cc.V2F_C4B_T2F(cc.vertex2F(0.0, 0.0), cc.c4b(0 , 0, 0, 0 ), cc.tex2F(0.0, 0.0)), cc.V2F_C4B_T2F(cc.vertex2F(0.0, 0.0), cc.c4b(0 , 0, 0, 0 ), cc.tex2F(0.0, 0.0)), cc.V2F_C4B_T2F(cc.vertex2F(0.0, 0.0), cc.c4b(0 , 0, 0, 0 ), cc.tex2F(0.0, 0.0)), cc.V2F_C4B_T2F(cc.vertex2F(0.0, 0.0), cc.c4b(0 , 0, 0, 0 ), cc.tex2F(0.0, 0.0)))")
return cc.V2F_C4B_T2F_Quad(cc.V2F_C4B_T2F(cc.vertex2F(0.0, 0.0), cc.c4b(0 , 0, 0, 0 ), cc.tex2F(0.0, 0.0)), cc.V2F_C4B_T2F(cc.vertex2F(0.0, 0.0), cc.c4b(0 , 0, 0, 0 ), cc.tex2F(0.0, 0.0)), cc.V2F_C4B_T2F(cc.vertex2F(0.0, 0.0), cc.c4b(0 , 0, 0, 0 ), cc.tex2F(0.0, 0.0)), cc.V2F_C4B_T2F(cc.vertex2F(0.0, 0.0), cc.c4b(0 , 0, 0, 0 ), cc.tex2F(0.0, 0.0)))
end
_G.ccV2F_C4B_T2F_Quad = ccV2FC4BT2FQuadDeprecated
local function ccV3FC4BT2FQuadDeprecated()
deprecatedTip("ccV3F_C4B_T2F_Quad","cc.V3F_C4B_T2F_Quad(_tl, _bl, _tr, _br)")
return cc.V3F_C4B_T2F_Quad(cc.V3F_C4B_T2F(cc.vertex3F(0.0, 0.0, 0.0), cc.c4b(0 , 0, 0, 0 ), cc.tex2F(0.0, 0.0)), cc.V3F_C4B_T2F(cc.vertex3F(0.0, 0.0, 0.0), cc.c4b(0 , 0, 0, 0 ), cc.tex2F(0.0, 0.0)), cc.V3F_C4B_T2F(cc.vertex3F(0.0, 0.0, 0.0), cc.c4b(0 , 0, 0, 0 ), cc.tex2F(0.0, 0.0)), cc.V3F_C4B_T2F(cc.vertex3F(0.0, 0.0, 0.0), cc.c4b(0 , 0, 0, 0 ), cc.tex2F(0.0, 0.0)))
end
_G.ccV3F_C4B_T2F_Quad = ccV3FC4BT2FQuadDeprecated
local function ccV2FC4FT2FQuadDeprecated()
deprecatedTip("ccV2F_C4F_T2F_Quad","cc.V2F_C4F_T2F_Quad(_bl, _br, _tl, _tr)")
return cc.V2F_C4F_T2F_Quad(cc.V2F_C4F_T2F(cc.vertex2F(0.0, 0.0), cc.c4f(0.0 , 0.0, 0.0, 0.0 ), cc.tex2F(0.0, 0.0)), cc.V2F_C4F_T2F(cc.vertex2F(0.0, 0.0), cc.c4f(0.0 , 0.0, 0.0, 0.0 ), cc.tex2F(0.0, 0.0)), cc.V3F_C4B_T2F(cc.vertex2F(0.0, 0.0), cc.c4f(0.0 , 0.0, 0.0, 0.0 ), cc.tex2F(0.0, 0.0)), cc.V2F_C4F_T2F(cc.vertex2F(0.0, 0.0), cc.c4f(0.0 , 0.0, 0.0, 0.0 ), cc.tex2F(0.0, 0.0)))
end
_G.ccV2F_C4F_T2F_Quad = ccV2FC4FT2FQuadDeprecated
local function ccT2FQuadDeprecated()
deprecatedTip("ccT2F_Quad","cc.T2F_Quad(_bl, _br, _tl, _tr)")
return cc.T2F_Quad(cc.tex2F(0.0,0.0), cc.tex2F(0.0,0.0), cc.tex2F(0.0,0.0), cc.tex2F(0.0,0.0))
end
_G.ccT2F_Quad = ccT2FQuadDeprecated
local function ccAnimationFrameDataDeprecated()
deprecatedTip("ccAnimationFrameData","cc.AnimationFrameData( _texCoords, _delay, _size)")
return cc.AnimationFrameData(cc.T2F_Quad(cc.tex2F(0.0,0.0), cc.tex2F(0.0,0.0), cc.tex2F(0.0,0.0), cc.tex2F(0.0,0.0)), 0, cc.size(0,0))
end
_G.ccAnimationFrameData = ccAnimationFrameDataDeprecated
local function tex2(u,v)
deprecatedTip("tex2(u,v)","cc.tex2f(u,v)")
return cc.tex2f(u,v)
end
_G.tex2 = tex2
--functions of CCApplication will be deprecated end
local CCApplicationDeprecated = { }
function CCApplicationDeprecated.sharedApplication()
deprecatedTip("CCApplication:sharedApplication","CCApplication:getInstance")
return CCApplication:getInstance()
end
CCApplication.sharedApplication = CCApplicationDeprecated.sharedApplication
--functions of CCApplication will be deprecated end
--functions of CCDirector will be deprecated end
local CCDirectorDeprecated = { }
function CCDirectorDeprecated.sharedDirector()
deprecatedTip("CCDirector:sharedDirector","CCDirector:getInstance")
return CCDirector:getInstance()
end
CCDirector.sharedDirector = CCDirectorDeprecated.sharedDirector
--functions of CCDirector will be deprecated end
--functions of CCUserDefault will be deprecated end
local CCUserDefaultDeprecated = { }
function CCUserDefaultDeprecated.sharedUserDefault()
deprecatedTip("CCUserDefault:sharedUserDefault","CCUserDefault:getInstance")
return CCUserDefault:getInstance()
end
CCUserDefault.sharedUserDefault = CCUserDefaultDeprecated.sharedUserDefault
function CCUserDefaultDeprecated.purgeSharedUserDefault()
deprecatedTip("CCUserDefault:purgeSharedUserDefault","CCUserDefault:destroyInstance")
return CCUserDefault:destroyInstance()
end
CCUserDefault.purgeSharedUserDefault = CCUserDefaultDeprecated.purgeSharedUserDefault
--functions of CCUserDefault will be deprecated end
--functions of CCGrid3DAction will be deprecated begin
local CCGrid3DActionDeprecated = { }
function CCGrid3DActionDeprecated.vertex(self,pt)
deprecatedTip("vertex","CCGrid3DAction:getVertex")
return self:getVertex(pt)
end
CCGrid3DAction.vertex = CCGrid3DActionDeprecated.vertex
function CCGrid3DActionDeprecated.originalVertex(self,pt)
deprecatedTip("originalVertex","CCGrid3DAction:getOriginalVertex")
return self:getOriginalVertex(pt)
end
CCGrid3DAction.originalVertex = CCGrid3DActionDeprecated.originalVertex
--functions of CCGrid3DAction will be deprecated end
--functions of CCTiledGrid3DAction will be deprecated begin
local CCTiledGrid3DActionDeprecated = { }
function CCTiledGrid3DActionDeprecated.tile(self,pt)
deprecatedTip("tile","CCTiledGrid3DAction:getTile")
return self:getTile(pt)
end
CCTiledGrid3DAction.tile = CCTiledGrid3DActionDeprecated.tile
function CCTiledGrid3DActionDeprecated.originalTile(self,pt)
deprecatedTip("originalTile","CCTiledGrid3DAction:getOriginalTile")
return self:getOriginalTile(pt)
end
CCTiledGrid3DAction.originalTile = CCTiledGrid3DActionDeprecated.originalTile
--functions of CCTiledGrid3DAction will be deprecated end
--functions of CCTexture2D will be deprecated begin
local CCTexture2DDeprecated = { }
function CCTexture2DDeprecated.stringForFormat(self)
deprecatedTip("Texture2D:stringForFormat","Texture2D:getStringForFormat")
return self:getStringForFormat()
end
CCTexture2D.stringForFormat = CCTexture2DDeprecated.stringForFormat
function CCTexture2DDeprecated.bitsPerPixelForFormat(self)
deprecatedTip("Texture2D:bitsPerPixelForFormat","Texture2D:getBitsPerPixelForFormat")
return self:getBitsPerPixelForFormat()
end
CCTexture2D.bitsPerPixelForFormat = CCTexture2DDeprecated.bitsPerPixelForFormat
function CCTexture2DDeprecated.bitsPerPixelForFormat(self,pixelFormat)
deprecatedTip("Texture2D:bitsPerPixelForFormat","Texture2D:getBitsPerPixelForFormat")
return self:getBitsPerPixelForFormat(pixelFormat)
end
CCTexture2D.bitsPerPixelForFormat = CCTexture2DDeprecated.bitsPerPixelForFormat
function CCTexture2DDeprecated.defaultAlphaPixelFormat(self)
deprecatedTip("Texture2D:defaultAlphaPixelFormat","Texture2D:getDefaultAlphaPixelFormat")
return self:getDefaultAlphaPixelFormat()
end
CCTexture2D.defaultAlphaPixelFormat = CCTexture2DDeprecated.defaultAlphaPixelFormat
--functions of CCTexture2D will be deprecated end
--functions of CCTimer will be deprecated begin
local CCTimerDeprecated = { }
function CCTimerDeprecated.timerWithScriptHandler(handler,seconds)
deprecatedTip("CCTimer:timerWithScriptHandler","CCTimer:createWithScriptHandler")
return CCTimer:createWithScriptHandler(handler,seconds)
end
CCTimer.timerWithScriptHandler = CCTimerDeprecated.timerWithScriptHandler
function CCTimerDeprecated.numberOfRunningActionsInTarget(self,target)
deprecatedTip("CCActionManager:numberOfRunningActionsInTarget","CCActionManager:getNumberOfRunningActionsInTarget")
return self:getNumberOfRunningActionsInTarget(target)
end
CCTimer.numberOfRunningActionsInTarget = CCTimerDeprecated.numberOfRunningActionsInTarget
--functions of CCTimer will be deprecated end
--functions of CCMenuItemFont will be deprecated begin
local CCMenuItemFontDeprecated = { }
function CCMenuItemFontDeprecated.fontSize()
deprecatedTip("CCMenuItemFont:fontSize","CCMenuItemFont:getFontSize")
return CCMenuItemFont:getFontSize()
end
CCMenuItemFont.fontSize = CCMenuItemFontDeprecated.fontSize
function CCMenuItemFontDeprecated.fontName()
deprecatedTip("CCMenuItemFont:fontName","CCMenuItemFont:getFontName")
return CCMenuItemFont:getFontName()
end
CCMenuItemFont.fontName = CCMenuItemFontDeprecated.fontName
function CCMenuItemFontDeprecated.fontSizeObj(self)
deprecatedTip("CCMenuItemFont:fontSizeObj","CCMenuItemFont:getFontSizeObj")
return self:getFontSizeObj()
end
CCMenuItemFont.fontSizeObj = CCMenuItemFontDeprecated.fontSizeObj
function CCMenuItemFontDeprecated.fontNameObj(self)
deprecatedTip("CCMenuItemFont:fontNameObj","CCMenuItemFont:getFontNameObj")
return self:getFontNameObj()
end
CCMenuItemFont.fontNameObj = CCMenuItemFontDeprecated.fontNameObj
--functions of CCMenuItemFont will be deprecated end
--functions of CCMenuItemToggle will be deprecated begin
local CCMenuItemToggleDeprecated = { }
function CCMenuItemToggleDeprecated.selectedItem(self)
deprecatedTip("CCMenuItemToggle:selectedItem","CCMenuItemToggle:getSelectedItem")
return self:getSelectedItem()
end
CCMenuItemToggle.selectedItem = CCMenuItemToggleDeprecated.selectedItem
--functions of CCMenuItemToggle will be deprecated end
--functions of CCTileMapAtlas will be deprecated begin
local CCTileMapAtlasDeprecated = { }
function CCTileMapAtlasDeprecated.tileAt(self,pos)
deprecatedTip("CCTileMapAtlas:tileAt","CCTileMapAtlas:getTileAt")
return self:getTileAt(pos)
end
CCTileMapAtlas.tileAt = CCTileMapAtlasDeprecated.tileAt
--functions of CCTileMapAtlas will be deprecated end
--functions of CCTMXLayer will be deprecated begin
local CCTMXLayerDeprecated = { }
function CCTMXLayerDeprecated.tileAt(self,tileCoordinate)
deprecatedTip("CCTMXLayer:tileAt","CCTMXLayer:getTileAt")
return self:getTileAt(tileCoordinate)
end
CCTMXLayer.tileAt = CCTMXLayerDeprecated.tileAt
function CCTMXLayerDeprecated.tileGIDAt(self,tileCoordinate)
deprecatedTip("CCTMXLayer:tileGIDAt","CCTMXLayer:getTileGIDAt")
return self:getTileGIDAt(tileCoordinate)
end
CCTMXLayer.tileGIDAt = CCTMXLayerDeprecated.tileGIDAt
function CCTMXLayerDeprecated.positionAt(self,tileCoordinate)
deprecatedTip("CCTMXLayer:positionAt","CCTMXLayer:getPositionAt")
return self:getPositionAt(tileCoordinate)
end
CCTMXLayer.positionAt = CCTMXLayerDeprecated.positionAt
function CCTMXLayerDeprecated.propertyNamed(self,propertyName)
deprecatedTip("CCTMXLayer:propertyNamed","CCTMXLayer:getProperty")
return self:getProperty(propertyName)
end
CCTMXLayer.propertyNamed = CCTMXLayerDeprecated.propertyNamed
--functions of CCTMXLayer will be deprecated end
--functions of CCTMXTiledMap will be deprecated begin
local CCTMXTiledMapDeprecated = { }
function CCTMXTiledMapDeprecated.layerNamed(self,layerName)
deprecatedTip("CCTMXTiledMap:layerNamed","CCTMXTiledMap:getLayer")
return self:getLayer(layerName)
end
CCTMXTiledMap.layerNamed = CCTMXTiledMapDeprecated.layerNamed
function CCTMXTiledMapDeprecated.propertyNamed(self,propertyName)
deprecatedTip("CCTMXTiledMap:propertyNamed","CCTMXTiledMap:getProperty")
return self:getProperty(propertyName)
end
CCTMXTiledMap.propertyNamed = CCTMXTiledMapDeprecated.propertyNamed
function CCTMXTiledMapDeprecated.propertiesForGID(self,GID)
deprecatedTip("CCTMXTiledMap:propertiesForGID","CCTMXTiledMap:getPropertiesForGID")
return self:getPropertiesForGID(GID)
end
CCTMXTiledMap.propertiesForGID = CCTMXTiledMapDeprecated.propertiesForGID
function CCTMXTiledMapDeprecated.objectGroupNamed(self,groupName)
deprecatedTip("CCTMXTiledMap:objectGroupNamed","CCTMXTiledMap:getObjectGroup")
return self:getObjectGroup(groupName)
end
CCTMXTiledMap.objectGroupNamed = CCTMXTiledMapDeprecated.objectGroupNamed
--functions of CCTMXTiledMap will be deprecated end
--functions of CCTMXMapInfo will be deprecated begin
local CCTMXMapInfoDeprecated = { }
function CCTMXMapInfoDeprecated.getStoringCharacters(self)
deprecatedTip("CCTMXMapInfo:getStoringCharacters","CCTMXMapInfo:isStoringCharacters")
return self:isStoringCharacters()
end
CCTMXMapInfo.getStoringCharacters = CCTMXMapInfoDeprecated.getStoringCharacters
function CCTMXMapInfoDeprecated.formatWithTMXFile(infoTable,tmxFile)
deprecatedTip("CCTMXMapInfo:formatWithTMXFile","CCTMXMapInfo:create")
return CCTMXMapInfo:create(tmxFile)
end
CCTMXMapInfo.formatWithTMXFile = CCTMXMapInfoDeprecated.formatWithTMXFile
function CCTMXMapInfoDeprecated.formatWithXML(infoTable,tmxString,resourcePath)
deprecatedTip("CCTMXMapInfo:formatWithXML","TMXMapInfo:createWithXML")
return CCTMXMapInfo:createWithXML(tmxString,resourcePath)
end
CCTMXMapInfo.formatWithXML = CCTMXMapInfoDeprecated.formatWithXML
--functions of CCTMXMapInfo will be deprecated end
--functions of CCTMXObject will be deprecated begin
local CCTMXObjectGroupDeprecated = { }
function CCTMXObjectGroupDeprecated.propertyNamed(self,propertyName)
deprecatedTip("CCTMXObjectGroup:propertyNamed","CCTMXObjectGroup:getProperty")
return self:getProperty(propertyName)
end
CCTMXObjectGroup.propertyNamed = CCTMXObjectGroupDeprecated.propertyNamed
function CCTMXObjectGroupDeprecated.objectNamed(self, objectName)
deprecatedTip("CCTMXObjectGroup:objectNamed","CCTMXObjectGroup:getObject")
return self:getObject(objectName)
end
CCTMXObjectGroup.objectNamed = CCTMXObjectGroupDeprecated.objectNamed
--functions of CCTMXObject will be deprecated end
--functions of CCRenderTexture will be deprecated begin
local CCRenderTextureDeprecated = { }
function CCRenderTextureDeprecated.newCCImage(self)
deprecatedTip("CCRenderTexture:newCCImage","CCRenderTexture:newImage")
return self:newImage()
end
CCRenderTexture.newCCImage = CCRenderTextureDeprecated.newCCImage
--functions of CCRenderTexture will be deprecated end
--functions of Sprite will be deprecated begin
local CCSpriteDeprecated = { }
function CCSpriteDeprecated.setFlipX(self,flag)
deprecatedTip("CCSpriteDeprecated:setFlipX","CCSpriteDeprecated:setFlippedX")
return self:setFlippedX(flag)
end
cc.Sprite.setFlipX = CCSpriteDeprecated.setFlipX
function CCSpriteDeprecated.setFlipY(self,flag)
deprecatedTip("CCSpriteDeprecated:setFlipY","CCSpriteDeprecated:setFlippedY")
return self:setFlippedY(flag)
end
cc.Sprite.setFlipY = CCSpriteDeprecated.setFlipY
--functions of Sprite will be deprecated end
--functions of Layer will be deprecated begin
local CCLayerDeprecated = {}
function CCLayerDeprecated.setKeypadEnabled( self, enabled)
return self:setKeyboardEnabled(enabled)
end
cc.Layer.setKeypadEnabled = CCLayerDeprecated.setKeypadEnabled
function CCLayerDeprecated.isKeypadEnabled(self)
return self:isKeyboardEnabled()
end
cc.Layer.isKeypadEnabled = CCLayerDeprecated.isKeypadEnabled
--functions of Layer will be deprecated end
--functions of cc.Node will be deprecated begin
local NodeDeprecated = { }
function NodeDeprecated.setZOrder(self,zOrder)
deprecatedTip("cc.Node:setZOrder","cc.Node:setLocalZOrder")
return self:setLocalZOrder(zOrder)
end
cc.Node.setZOrder = NodeDeprecated.setZOrder
function NodeDeprecated.getZOrder(self)
deprecatedTip("cc.Node:getZOrder","cc.Node:getLocalZOrder")
return self:getLocalZOrder()
end
cc.Node.getZOrder = NodeDeprecated.getZOrder
function NodeDeprecated.setVertexZ(self,vertexZ)
deprecatedTip("cc.Node:setVertexZ", "cc.Node:setPositionZ")
return self:setPositionZ(vertexZ)
end
cc.Node.setVertexZ = NodeDeprecated.setVertexZ
function NodeDeprecated.getVertexZ(self)
deprecatedTip("cc.Node:getVertexZ", "cc.Node:getPositionZ")
return self:getPositionZ()
end
cc.Node.getVertexZ = NodeDeprecated.getVertexZ
--functions of cc.Node will be deprecated end
--functions of cc.GLProgram will be deprecated begin
local GLProgram = { }
function GLProgram.initWithVertexShaderByteArray(self,vShaderByteArray, fShaderByteArray)
deprecatedTip("cc.GLProgram:initWithVertexShaderByteArray","cc.GLProgram:initWithByteArrays")
return self:initWithByteArrays(vShaderByteArray, fShaderByteArray)
end
cc.GLProgram.initWithVertexShaderByteArray = GLProgram.initWithVertexShaderByteArray
function GLProgram.initWithVertexShaderFilename(self,vShaderByteArray, fShaderByteArray)
deprecatedTip("cc.GLProgram:initWithVertexShaderFilename","cc.GLProgram:initWithFilenames")
return self:initWithFilenames(vShaderByteArray, fShaderByteArray)
end
cc.GLProgram.initWithVertexShaderFilename = GLProgram.initWithVertexShaderFilename
function GLProgram.addAttribute(self, attributeName, index)
deprecatedTip("cc.GLProgram:addAttribute","cc.GLProgram:bindAttribLocation")
return self:bindAttribLocation(attributeName, index)
end
cc.GLProgram.addAttribute = GLProgram.addAttribute
--functions of cc.GLProgram will be deprecated end