146 lines
3.6 KiB
ActionScript
146 lines
3.6 KiB
ActionScript
package com.comfig
|
|
{
|
|
import com.view.ui.load.LoadUIData;
|
|
|
|
public class PathConfig
|
|
{
|
|
|
|
private static var instance:PathConfig;
|
|
|
|
private var serverPath:String;
|
|
|
|
private var serverIp:String;
|
|
|
|
private var serverPort:int;
|
|
|
|
private var uiPathArr:Array;
|
|
|
|
private var loadCountSize:Number;
|
|
|
|
private var webPath:String;
|
|
|
|
private var viewGift:int;
|
|
|
|
private var viewReg:int;
|
|
|
|
private var currVer:String = "0.2013070614431";
|
|
|
|
public function PathConfig()
|
|
{
|
|
super();
|
|
}
|
|
|
|
public static function getInstance() : PathConfig
|
|
{
|
|
if(instance == null)
|
|
{
|
|
instance = new PathConfig();
|
|
}
|
|
return instance;
|
|
}
|
|
|
|
public function Init(param1:XML) : void
|
|
{
|
|
var _loc3_:* = undefined;
|
|
var _loc4_:String = null;
|
|
var _loc5_:LoadUIData = null;
|
|
var _loc6_:Array = null;
|
|
var _loc7_:Array = null;
|
|
var _loc8_:* = undefined;
|
|
var _loc9_:int = 0;
|
|
this.serverPath = param1.server[0].@url;
|
|
this.serverIp = param1.serverIp[0].@url;
|
|
this.serverPort = int(param1.serverIp[0].@port);
|
|
this.webPath = param1.server[0].@web;
|
|
this.viewGift = param1.server[0].@viewGift;
|
|
this.viewReg = param1.server[0].@viewReg;
|
|
var _loc2_:int = int(param1.server[0].@viewLater);
|
|
if(_loc2_ == 1)
|
|
{
|
|
CommonData.isOpenLaterAward = true;
|
|
}
|
|
this.uiPathArr = new Array();
|
|
for(_loc3_ in param1.property)
|
|
{
|
|
_loc5_ = new LoadUIData();
|
|
_loc5_.path = param1.property[_loc3_].@path;
|
|
_loc5_.name = param1.property[_loc3_].@name;
|
|
_loc5_.ver = param1.property[_loc3_].@ver;
|
|
_loc5_.type = param1.property[_loc3_].@type;
|
|
this.uiPathArr.push(_loc5_);
|
|
}
|
|
_loc4_ = param1.server[0].@countryId;
|
|
if(_loc4_)
|
|
{
|
|
_loc6_ = _loc4_.split(",");
|
|
_loc7_ = new Array();
|
|
for each(_loc8_ in _loc6_)
|
|
{
|
|
_loc9_ = int(_loc8_);
|
|
if(_loc9_ > 0)
|
|
{
|
|
_loc7_.push(_loc9_);
|
|
}
|
|
}
|
|
CommonData.setCountryArr(_loc7_);
|
|
}
|
|
}
|
|
|
|
public function getViewReg() : int
|
|
{
|
|
return this.viewReg;
|
|
}
|
|
|
|
public function getViewGift() : int
|
|
{
|
|
return this.viewGift;
|
|
}
|
|
|
|
public function getUiPathArr() : Array
|
|
{
|
|
return this.uiPathArr;
|
|
}
|
|
|
|
public function setSize(param1:int, param2:Number) : void
|
|
{
|
|
this.uiPathArr[param1].size = param2;
|
|
}
|
|
|
|
public function getSize(param1:int) : Number
|
|
{
|
|
return this.uiPathArr[param1].size;
|
|
}
|
|
|
|
public function getServerPath() : String
|
|
{
|
|
return this.serverPath;
|
|
}
|
|
|
|
public function getWebPath() : String
|
|
{
|
|
return this.webPath;
|
|
}
|
|
|
|
public function getServerIp() : String
|
|
{
|
|
return this.serverIp;
|
|
}
|
|
|
|
public function getServerPort() : int
|
|
{
|
|
return this.serverPort;
|
|
}
|
|
|
|
public function getVerStr(param1:String) : String
|
|
{
|
|
return param1;
|
|
}
|
|
|
|
public function setVerson(param1:String) : void
|
|
{
|
|
this.currVer = param1;
|
|
}
|
|
}
|
|
}
|
|
|