jsc 是加密后的js代码, js是脚本代码, 不是编译型语言, 理论上也是可以反编译出来变量名的.
仔细研究了下js的编译引擎代码, 得出以下结论:
1. 变量名分为两种局部变量名和全局变量名.
2. 局部变量名作用域只在函数内部, 全局变量名作用域在全局范围内.
3. javascript是弱类型语言, 局部变量和全局变量分的不是太清楚, 其实都可以算为全局变量名, 递归作用域.
4. 所有的变量都放在函数上下文
var CuoPaiLayerNew;
CuoPaiLayerNew = cc.Layer.extend({
sprite: null,
ctor: function(cardIds) {
this._super();
var size = cc.winSize;
this.posX = (cc.winSize.width / 2);
this.posY = ((cc.winSize.height / 2) - 80);
this.initCardInfo(cardIds);
this.ratioVal = 0;
this.CuoPaiLayer_State_Move = 0;
this.CuoPaiLayer_State_Smooth = 1;
var CuoPaiLayer_Pai = 3.141592;
this.CuoPaiLayer_RotationFrame = 10;
this.CuoPaiLayer_RotationAnger = (CuoPaiLayer_Pai / 3);
this.CuoPaiLayer_SmoothFrame = 10;
this.CuoPaiLayer_SmoothAnger = (CuoPaiLayer_Pai / 6);
this.state = this.CuoPaiLayer_State_Move;
this.__createSprites();
this.__registTouchEvent();
return true;
},
getPaiBmSStr: function() {
var str = "";
cc.error("newCuoPaiLayerNew");
switch (DNRoomModel.pbYanse) {
case - 1 : case 1:
str = "res/ui/nmw/cuopaiZm/cardbm4.png";
break;
case 2:
str = "res/ui/nmw/cuopaiZm/cardbm3.png";
break;
case 3:
str = "res/ui/nmw/cuopaiZm/cardbm1.png";
break;
case 4:
str = "res/ui/nmw/cuopaiZm/cardbm2.png";
break;
default:
}