抽卡删除额外界面,单个角色展示跳过
parent
3294d11a48
commit
611a965615
BIN
ProjectNLD/Assets/Art/UI/Fonts/SourceHanSansCN-Medium SDF.asset (Stored with Git LFS)
BIN
ProjectNLD/Assets/Art/UI/Fonts/SourceHanSansCN-Medium SDF.asset (Stored with Git LFS)
Binary file not shown.
|
|
@ -1173,6 +1173,127 @@ MonoBehaviour:
|
|||
m_hasFontAssetChanged: 0
|
||||
m_baseMaterial: {fileID: 0}
|
||||
m_maskOffset: {x: 0, y: 0, z: 0, w: 0}
|
||||
--- !u!1 &3126998781884003385
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 4329803658285021826}
|
||||
- component: {fileID: 2774746740249767456}
|
||||
- component: {fileID: 772277698827964999}
|
||||
- component: {fileID: 1998198730399914449}
|
||||
m_Layer: 5
|
||||
m_Name: ButtonSkip
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &4329803658285021826
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 3126998781884003385}
|
||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children:
|
||||
- {fileID: 888054655277518922}
|
||||
m_Father: {fileID: 9067464428911366345}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||
m_AnchoredPosition: {x: 762.5266, y: 469.59998}
|
||||
m_SizeDelta: {x: 378, y: 111}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &2774746740249767456
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 3126998781884003385}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!114 &772277698827964999
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 3126998781884003385}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_RaycastTarget: 1
|
||||
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_Maskable: 1
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_Sprite: {fileID: 21300000, guid: 2650c275a02010d44ba0ba709e70d738, type: 3}
|
||||
m_Type: 0
|
||||
m_PreserveAspect: 1
|
||||
m_FillCenter: 1
|
||||
m_FillMethod: 4
|
||||
m_FillAmount: 1
|
||||
m_FillClockwise: 1
|
||||
m_FillOrigin: 0
|
||||
m_UseSpriteMesh: 0
|
||||
m_PixelsPerUnitMultiplier: 1
|
||||
--- !u!114 &1998198730399914449
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 3126998781884003385}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Navigation:
|
||||
m_Mode: 3
|
||||
m_WrapAround: 0
|
||||
m_SelectOnUp: {fileID: 0}
|
||||
m_SelectOnDown: {fileID: 0}
|
||||
m_SelectOnLeft: {fileID: 0}
|
||||
m_SelectOnRight: {fileID: 0}
|
||||
m_Transition: 1
|
||||
m_Colors:
|
||||
m_NormalColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
|
||||
m_PressedColor: {r: 0.43529412, g: 0.43529412, b: 0.43529412, a: 1}
|
||||
m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
|
||||
m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608}
|
||||
m_ColorMultiplier: 1
|
||||
m_FadeDuration: 0.1
|
||||
m_SpriteState:
|
||||
m_HighlightedSprite: {fileID: 0}
|
||||
m_PressedSprite: {fileID: 0}
|
||||
m_SelectedSprite: {fileID: 0}
|
||||
m_DisabledSprite: {fileID: 0}
|
||||
m_AnimationTriggers:
|
||||
m_NormalTrigger: Normal
|
||||
m_HighlightedTrigger: Highlighted
|
||||
m_PressedTrigger: Pressed
|
||||
m_SelectedTrigger: Selected
|
||||
m_DisabledTrigger: Disabled
|
||||
m_Interactable: 1
|
||||
m_TargetGraphic: {fileID: 772277698827964999}
|
||||
m_OnClick:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
--- !u!1 &3289010187584910671
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
|
|
@ -1701,6 +1822,7 @@ RectTransform:
|
|||
m_ConstrainProportionsScale: 0
|
||||
m_Children:
|
||||
- {fileID: 4066303934932119806}
|
||||
- {fileID: 4329803658285021826}
|
||||
- {fileID: 7579296509468913036}
|
||||
- {fileID: 1120523153231346559}
|
||||
- {fileID: 8169987123081614725}
|
||||
|
|
@ -1865,6 +1987,141 @@ MonoBehaviour:
|
|||
m_FillOrigin: 0
|
||||
m_UseSpriteMesh: 0
|
||||
m_PixelsPerUnitMultiplier: 1
|
||||
--- !u!1 &4281843857249979789
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 888054655277518922}
|
||||
- component: {fileID: 2780607575261019169}
|
||||
- component: {fileID: 7745674339527480419}
|
||||
m_Layer: 5
|
||||
m_Name: Text
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &888054655277518922
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 4281843857249979789}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 4329803658285021826}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||
m_AnchoredPosition: {x: 83.1, y: 1.7}
|
||||
m_SizeDelta: {x: 378, y: 112}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &2780607575261019169
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 4281843857249979789}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!114 &7745674339527480419
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 4281843857249979789}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_RaycastTarget: 0
|
||||
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_Maskable: 1
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_text: "\u8DF3\u8FC7"
|
||||
m_isRightToLeft: 0
|
||||
m_fontAsset: {fileID: 11400000, guid: d996718f19de68245bc356be2938e063, type: 2}
|
||||
m_sharedMaterial: {fileID: -8559898196655864114, guid: d996718f19de68245bc356be2938e063,
|
||||
type: 2}
|
||||
m_fontSharedMaterials: []
|
||||
m_fontMaterial: {fileID: 0}
|
||||
m_fontMaterials: []
|
||||
m_fontColor32:
|
||||
serializedVersion: 2
|
||||
rgba: 4294967295
|
||||
m_fontColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_enableVertexGradient: 0
|
||||
m_colorMode: 3
|
||||
m_fontColorGradient:
|
||||
topLeft: {r: 1, g: 1, b: 1, a: 1}
|
||||
topRight: {r: 1, g: 1, b: 1, a: 1}
|
||||
bottomLeft: {r: 1, g: 1, b: 1, a: 1}
|
||||
bottomRight: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_fontColorGradientPreset: {fileID: 0}
|
||||
m_spriteAsset: {fileID: 0}
|
||||
m_tintAllSprites: 0
|
||||
m_StyleSheet: {fileID: 0}
|
||||
m_TextStyleHashCode: -1183493901
|
||||
m_overrideHtmlColors: 0
|
||||
m_faceColor:
|
||||
serializedVersion: 2
|
||||
rgba: 4294967295
|
||||
m_fontSize: 50
|
||||
m_fontSizeBase: 50
|
||||
m_fontWeight: 400
|
||||
m_enableAutoSizing: 0
|
||||
m_fontSizeMin: 18
|
||||
m_fontSizeMax: 72
|
||||
m_fontStyle: 0
|
||||
m_HorizontalAlignment: 2
|
||||
m_VerticalAlignment: 512
|
||||
m_textAlignment: 65535
|
||||
m_characterSpacing: 0
|
||||
m_wordSpacing: 0
|
||||
m_lineSpacing: 0
|
||||
m_lineSpacingMax: 0
|
||||
m_paragraphSpacing: 0
|
||||
m_charWidthMaxAdj: 0
|
||||
m_enableWordWrapping: 1
|
||||
m_wordWrappingRatios: 0.4
|
||||
m_overflowMode: 0
|
||||
m_linkedTextComponent: {fileID: 0}
|
||||
parentLinkedComponent: {fileID: 0}
|
||||
m_enableKerning: 1
|
||||
m_enableExtraPadding: 0
|
||||
checkPaddingRequired: 0
|
||||
m_isRichText: 1
|
||||
m_parseCtrlCharacters: 1
|
||||
m_isOrthographic: 1
|
||||
m_isCullingEnabled: 0
|
||||
m_horizontalMapping: 0
|
||||
m_verticalMapping: 0
|
||||
m_uvLineOffset: 0
|
||||
m_geometrySortingOrder: 0
|
||||
m_IsTextObjectScaleStatic: 0
|
||||
m_VertexBufferAutoSizeReduction: 0
|
||||
m_useMaxVisibleDescender: 1
|
||||
m_pageToDisplay: 1
|
||||
m_margin: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_isUsingLegacyAnimationComponent: 0
|
||||
m_isVolumetricText: 0
|
||||
m_hasFontAssetChanged: 0
|
||||
m_baseMaterial: {fileID: 0}
|
||||
m_maskOffset: {x: 0, y: 0, z: 0, w: 0}
|
||||
--- !u!1 &4317114355924734637
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ using UnityEngine.UI;
|
|||
public class UI_DrawPannelCharacterController : UIWindow
|
||||
{
|
||||
/// <summary>
|
||||
/// 打开抽卡主界面
|
||||
/// 打开单次抽卡角色界面
|
||||
/// </summary>
|
||||
public static async UniTask<UIWindow> Open(RaffleResultData drawData)
|
||||
{
|
||||
|
|
@ -134,10 +134,10 @@ public class UI_DrawPannelCharacterController : UIWindow
|
|||
await PreLoadAssets(drawData);
|
||||
}
|
||||
|
||||
|
||||
public override void OnInit()
|
||||
{
|
||||
btnContinues = GetComponent<Button>("Image_Bg");
|
||||
btnSkip = GetComponent<Button>("ButtonSkip");
|
||||
imagePoster = GetComponent<Image>("Image_CharacterPoster");
|
||||
imageFraction = GetComponent<Image>("Image_InfoBg/Image_Faction");
|
||||
imageRegion = GetComponent<Image>("Image_InfoBg/Image_Region");
|
||||
|
|
@ -180,8 +180,8 @@ public class UI_DrawPannelCharacterController : UIWindow
|
|||
}
|
||||
#endregion
|
||||
|
||||
BindButton(btnContinues, OnContinues);
|
||||
//BindButton(btnSkip, OnSkip);
|
||||
BindButton(btnContinues, OnShowNext);
|
||||
BindButton(btnSkip, OnSkip);
|
||||
}
|
||||
|
||||
protected override void OnShowWindow(object data = null)
|
||||
|
|
@ -341,7 +341,7 @@ public class UI_DrawPannelCharacterController : UIWindow
|
|||
/// <summary>
|
||||
/// 继续
|
||||
/// </summary>
|
||||
private async void OnContinues()
|
||||
private async void OnShowNext()
|
||||
{
|
||||
if (drawData.IsShowNext)
|
||||
{
|
||||
|
|
@ -353,8 +353,7 @@ public class UI_DrawPannelCharacterController : UIWindow
|
|||
return;
|
||||
}
|
||||
|
||||
await UI_DrawResultCharactersController.Open(drawData);
|
||||
CloseWindow();
|
||||
OnSkip();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
|
|||
|
|
@ -160,7 +160,7 @@ public class UI_RaffleAnimController : UIWindow
|
|||
videoPlayer.Stop();
|
||||
AudioManager.Instance.StopAllMusic();
|
||||
|
||||
await UI_RaffleOneResultController.Open(drawData);
|
||||
await UI_DrawPannelCharacterController.Open(drawData);
|
||||
|
||||
CloseWindow();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,132 +0,0 @@
|
|||
using cfg.CharacterCfg;
|
||||
using cfg.DialogueCfg;
|
||||
using Cysharp.Threading.Tasks;
|
||||
using Framework;
|
||||
using Gameplay;
|
||||
using TMPro;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
/// <summary>
|
||||
/// 单次抽卡结果测试界面
|
||||
/// </summary>
|
||||
public class UI_RaffleOneResultController : UIWindow
|
||||
{
|
||||
/// <summary>
|
||||
/// 打开单次抽卡结果界面
|
||||
/// </summary>
|
||||
public static async UniTask<UIWindow> Open(RaffleResultData raffleData)
|
||||
{
|
||||
CommonUtils.ChangeUIScene(Constants.RAFFLE_SCENE_PATH); // 切换到抽卡场景
|
||||
|
||||
return await UIManager.Instance.CreateAndOpenWindow(UINameConst.UI_DrawPannelCharacter, raffleData);
|
||||
}
|
||||
|
||||
#region UI
|
||||
/// <summary>
|
||||
/// 继续
|
||||
/// </summary>
|
||||
private Button btnContinues;
|
||||
/// <summary>
|
||||
/// 跳过
|
||||
/// </summary>
|
||||
private Button btnSkip;
|
||||
/// <summary>
|
||||
/// 角色立绘
|
||||
/// </summary>
|
||||
private Image imagePoster;
|
||||
/// <summary>
|
||||
/// 角色名
|
||||
/// </summary>
|
||||
private TMP_Text textName;
|
||||
#endregion
|
||||
|
||||
/// <summary>
|
||||
/// 台词语音
|
||||
/// </summary>
|
||||
private AudioInst _dialogueAudioCri;
|
||||
private RaffleResultData drawData;
|
||||
|
||||
public override void OnInit()
|
||||
{
|
||||
btnContinues = GetComponent<Button>("ImageBG");
|
||||
btnSkip = GetComponent<Button>("ImageBG/UI_Topbtn/ButtonSkip");
|
||||
imagePoster = GetComponent<Image>("ImageBG/Image_Poster");
|
||||
textName = GetComponent<TMP_Text>("ImageBG/Image_GroupLogo/Image_NameInfo/Text_CharacterName");
|
||||
|
||||
BindButton(btnContinues, OnContinues);
|
||||
BindButton(btnSkip, OnSkip);
|
||||
}
|
||||
|
||||
public override async void PreLoad(object data = null)
|
||||
{
|
||||
if (data is not RaffleResultData draw)
|
||||
{
|
||||
DebugUtil.LogError("数据错误");
|
||||
return;
|
||||
}
|
||||
|
||||
drawData = draw;
|
||||
|
||||
DataCharacterAttri cfg = drawData.CharacterAttri;
|
||||
if (null == cfg)
|
||||
return;
|
||||
|
||||
string imgPath = CommonUtils.GetCharacterPicPath(cfg.RoleID, CommonUtils.ECharacterPicPathType.Cultivate);
|
||||
await PostPreload<Sprite>(imgPath);
|
||||
}
|
||||
|
||||
protected override void OnShowWindow(object data = null)
|
||||
{
|
||||
OnReloadWindow(null);
|
||||
}
|
||||
|
||||
protected override void OnReloadWindow(object data)
|
||||
{
|
||||
DataCharacterAttri cfg = drawData.CharacterAttri;
|
||||
if (null == cfg)
|
||||
return;
|
||||
|
||||
string imgPath = CommonUtils.GetCharacterPicPath(cfg.RoleID, CommonUtils.ECharacterPicPathType.Cultivate);
|
||||
Sprite sprite = GetPreLoadResult<Sprite>(imgPath);
|
||||
CommonUtils.RefreshCharacter2DPic(imagePoster, sprite);
|
||||
textName.text = CommonUtils.GetCharacterName(cfg.RoleID);
|
||||
|
||||
_dialogueAudioCri?.Stop();
|
||||
_dialogueAudioCri = DialogueManager.Instance.PlayDiaogue(cfg.RoleID, E_DialogueType.RaffleGet);
|
||||
}
|
||||
|
||||
protected override void OnHideWindow()
|
||||
{
|
||||
AudioManager.Instance.AudioMgrObj.StopAllSounds();
|
||||
|
||||
base.OnHideWindow();
|
||||
}
|
||||
|
||||
#region 按钮点击回调方法
|
||||
/// <summary>
|
||||
/// 继续
|
||||
/// </summary>
|
||||
private async void OnContinues()
|
||||
{
|
||||
if (drawData.IsShowNext)
|
||||
{
|
||||
drawData.ShowIndex++;
|
||||
ReloadWindow(null);
|
||||
return;
|
||||
}
|
||||
|
||||
await UI_DrawResultCharactersController.Open(drawData);
|
||||
CloseWindow();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 跳过
|
||||
/// </summary>
|
||||
private async void OnSkip()
|
||||
{
|
||||
await UI_DrawResultCharactersController.Open(drawData);
|
||||
CloseWindow();
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
|
|
@ -1,11 +0,0 @@
|
|||
fileFormatVersion: 2
|
||||
guid: b3817c1608ef66c4b9b50ab18bdd6d9f
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Loading…
Reference in New Issue