private void ApplyFrontTexture(HasPhysicalCard physicalCard, CardInfo cardInfo) { var frontTextureName = cardInfo.CardFrontTexture; var textureFolder = VisualManager.Instance.CardTexturesPath; if (textureFolder.EndsWith("\\") == false) { textureFolder += "\\"; } var frontTexture = Resources.Load(textureFolder + frontTextureName) as Texture; if (frontTexture == null) { frontTexture = Resources.Load(frontTextureName) as Texture; } if (frontTexture != null) { VisualManager.Instance.PhysicalCard.SetCardFront(physicalCard.PhysicalCardGO, frontTexture); } }
private void ApplyBackTexture(HasPhysicalCard physicalCard, bool player) { var backTextureName = player ? GameManager.Instance.MatchInfo.PlayerCardBackTexture : GameManager.Instance.MatchInfo.EnemyCardBackTexture; var textureFolder = VisualManager.Instance.CardTexturesPath; if (textureFolder.EndsWith("\\") == false) { textureFolder += "\\"; } var backTexture = Resources.Load(textureFolder + backTextureName) as Texture; if (backTexture == null) { backTexture = Resources.Load(backTextureName) as Texture; } if (backTexture != null) { VisualManager.Instance.PhysicalCard.SetCardBack(physicalCard.PhysicalCardGO, backTexture); } }