protected void SetNeedToTransitionToIdle(GameObject character, bool needToTransitionToIdle) { if (character != null) { PlayerEquipmentDataLookup lookup = character.GetDataLookupILRComponent <PlayerEquipmentDataLookup>("Hotfix_LT.UI.PlayerEquipmentDataLookup", false); if (lookup == null) { MoveController mc = character.GetComponent <MoveController>(); if (mc != null && mc.GetMoveByState(MoveController.CombatantMoveState.kLobby) != null) { System.Action fn = () => { lookup = character.AddDataLookupILRComponent <PlayerEquipmentDataLookup>("Hotfix_LT.UI.PlayerEquipmentDataLookup"); lookup.needToTransitionToIdle = needToTransitionToIdle; }; if (!mc.IsInitialized) { mc.RegisterInitSuccCallBack(fn); } else { fn(); } } } else { lookup.needToTransitionToIdle = needToTransitionToIdle; } } }
protected void OnClick(GameObject go) { if (mCurrent == null) { return; } if (mCurrent.character == null) { return; } PlayerEquipmentDataLookup equip = mCurrent.character.GetDataLookupILRComponent <PlayerEquipmentDataLookup>(false); if (equip != null) { equip.ForceTransitionToAlternateIdle(); } }
/// <summary> /// Muniuma_Model Muniuma+"_Model_" Muniuma 取自Muniuma-Variant /// </summary> /// <param name="equipmentType"></param> /// <param name="inventoryDataID"></param> protected void UpdateEquipment(string equipmentType, string ecomomy_id) { string equipmentAssetName; //卸下逻辑 if (string.IsNullOrEmpty(ecomomy_id)) { equipmentAssetName = GetDefaltEquipAssetName(userid + "", equipmentType); } else { //穿上逻辑 if (string.IsNullOrEmpty(ecomomy_id)) { equipmentAssetName = GetDefaltEquipAssetName(userid + "", equipmentType); } else { string raceModel = PlayerEquipmentDataLookup.GetModeAtributeName(userid.ToString()); if (string.IsNullOrEmpty(raceModel)) { equipmentAssetName = GetDefaltEquipAssetName(userid + "", equipmentType); } else { //string equipmentName = EconemyTemplateManager.GetPartitionName(raceModel, ecomomy_id); TODOX string equipmentName = string.Empty; if (string.IsNullOrEmpty(equipmentName)) { equipmentAssetName = GetDefaltEquipAssetName(userid + "", equipmentType); } else { equipmentAssetName = equipmentName; } } } } //bool foundAsset = false; string nexteqpname = ecomomy_id; string preeqpname = null; if (preEquipmentDic.ContainsKey(equipmentType)) { preeqpname = preEquipmentDic[equipmentType]; } OnEquipmentChanged(equipmentType, preeqpname, nexteqpname); AvatarComponent avatar = mDL.transform.GetComponent <AvatarComponent>(); if (avatar != null) { avatar.LoadEquipment(equipmentType, equipmentAssetName /*, inventoryDataID*/); } long uid = 0; DataLookupsCache.Instance.SearchDataByID <long>("user.uid", out uid); //LoginManager.Instance.LocalUserId.Value if (userid == uid && !PerformanceManager.Instance.CurrentEnvironmentInfo.slowDevice) { GameEngine.Instance.SetHideColorTarget(mDL.gameObject); } }