public void LoadAssetPlatform() { if (containerAssetsPlatforms == null) { return; } if (assetPlatformCode != BaseDataObjectKeys.none && lastAssetPlatformCode != assetPlatformCode) { lastAssetPlatformCode = assetPlatformCode; GameObject go = AppContentAssets.LoadAssetLevelAssets(assetPlatformCode); if (go != null) { containerAssetsPlatforms.DestroyChildren(); go.transform.parent = containerAssetsPlatforms.transform; go.TrackObject(containerAssetsPlatforms); } } }
public void LoadAsset() { if (containerAssets == null) { return; } if (isActionCodeSave) { return; } if (assetCode != BaseDataObjectKeys.none && lastAssetCode != assetCode) { lastAssetCode = assetCode; if (gameCharacter == null) { return; } assetAnimationNameIdle = gameCharacter.data.GetAnimationsByTypeIdle().code; assetAnimationNamePlay = gameCharacter.data.GetAnimationsByTypeStart().code; GameObject go = AppContentAssets.LoadAssetLevelAssets( gameCharacter.data.GetModel().code); if (go != null) { containerAssets.DestroyChildren(); go.transform.parent = containerAssets.transform; go.TrackObject(containerAssets); if (isActionCodeAttack || isActionCodeDefend) { // Add game damage Collider goCollider = go.GetOrSet <Collider>(); if (goCollider != null) { gameDamageManager = goCollider.gameObject.GetOrSet <GameDamageManager>(); gameDamageManager.audioHit = "attack-hit-1"; gameDamageManager.effectDestroy = "effect-explosion"; gameDamageManager.enableObjectRemove = false; gameDamageManager.HP = hitPoints; gameDamageManager.UpdateGameObjects(); } } AssetAnimationReset(); } } }