private WGGameWorld _ShareWorld; // void Start() { if (_ShareWorld == null) { _ShareWorld = WGGameWorld.Instance; } }
public void InitWithGameWorld(WGGameWorld World) { _sp = Core.fc.sp; szBigBear = new List <int>() { WGDefine.BossID, WGDefine.PayBear1, WGDefine.PayBear2 }; _EnergyFull = Core.fc.EnergyFull; Speed = _sp.SPEED_commen; if (_dataPlayer.DelAD == 0) { #if Add_AD wuqiTran.localPosition = Core.fc.weaponsPos1; #else wuqiTran.localPosition = Core.fc.weaponsPos; #endif } else { wuqiTran.localPosition = Core.fc.weaponsPos; } TongueRoot.ESetActive(true); mTurnPlate.v3Rotate = Core.fc.turnPlateComm; csRoteTp.V = Core.fc.turnPlateComm.z / 40.0f;//result is 0.3 tDeskPanel.localPosition = Core.fc.deskPos; coinDropBox.transform.localPosition = Core.fc.boxCoin.pos; coinDropBox.size = Core.fc.boxCoin.size; coinDropBox.center = Core.fc.boxCoin.center; collectionDropBox.transform.localPosition = Core.fc.boxColletion.pos; collectionDropBox.size = Core.fc.boxColletion.size; collectionDropBox.center = Core.fc.boxColletion.center; pgHaiXiao.value = _dataPlayer.mEnergy * 1.0f / _EnergyFull; _ShareWorld = World; dataCtrl = WGDataController.Instance; _ShareObjManager = World.cs_ObjManager; _TongueSide = _sp.Backward; _TurnPlateTrans = BearRoot.transform; _DeadBearList = new Queue <Transform>(); TreeTween.gameObject.SetActive(false); goIceDesk.SetActive(false); ResetAllBear(); }
void InitSuperTiger() { if (bInit) { return; } bInit = true; _shareWorld = WGGameWorld.Instance; _CurrentShowID = new int[3]; _WantShowID = new int[3]; WGDataController.Instance.loadSuperTiger(); _szTigerInfo = WGDataController.Instance.szSuperTiger; _TigerWeightList = WGDataController.Instance._szSuperTigerWeight; _AllTigerWeight = WGDataController.Instance._AllTigerWeight; }
// Use this for initialization void Start() { //StartRotate(); Instance = this; TextAsset s = Resources.Load(WGConfig.Path_Tiger) as TextAsset; TigerInfo tem; using (StreamReader sr = new StreamReader(new MemoryStream(s.bytes))) { string line; while ((line = sr.ReadLine()) != null) { tem = SDK.Deserialize <TigerInfo>(line); _szTigerInfo.Add(tem); } } Resources.UnloadAsset(s); int num = _szTigerInfo.Count; _TigerWeightList = new List <int>(); _TigerWeightList.Add(_szTigerInfo[0].Weight); for (int i = 1; i < num; i++) { if (_szTigerInfo[i].ID == 4112) { _777Index = i; } _TigerWeightList.Add(_TigerWeightList[i - 1] + _szTigerInfo[i].Weight); } _AllTigerWeight = _TigerWeightList[num - 1]; _shareWorld = WGGameWorld.Instance; _CurrentShowID = new int[3]; _WantShowID = new int[3]; }
// public void DonotNeedCoin(float time) // { // CancelInvoke("retNeedCoin"); // bNeedCoin = false; // Invoke("retNeedCoin",time); // } // void retNeedCoin() // { // bNeedCoin = true; // } void Start() { if (dp.DelAD == 0) { Up = Up_Add; } else { Up = upTemp; } _ShareWorld = WGGameWorld.Instance; _dataCtrl = WGDataController.Instance; // for(int i=0;i<_dataCtrl.szWeapons.Count;i++) // { // WGWeapon wep = WGWeapon.CreateWeapon(i); // wep.gameObject.SetActive(false); // wep.transform.parent = this.transform; // wep.transform.localPosition = Vector3.zero; // wep.transform.localRotation = Quaternion.Euler(Vector3.zero); // wep.transform.localScale = Vector3.one; // szWeaponGO.Add(wep); // } mWeaponIndex = 0; // _Weapon = szWeaponGO[0]; _Weapon = WGWeapon.CreateWeapon(); SDK.AddChild(_Weapon.gameObject, this.gameObject); _Weapon.transform.localPosition = new Vector3(0, 0, -0.99f); // _Weapon.labCostCoin = labCostNum; _Weapon.ESetActive(true); _weaponData = _dataCtrl.szWeapons[0]; UIEventListener.Get(goEvent).onPress += this.myOnPress; CheckStaticWeapon(); }
private GameObject _BearCoinRoot; // public void InitWithGameWorld(WGGameWorld World) { }