| | |
| | | [SerializeField] Text m_NPCNameLV; |
| | | [SerializeField] Text m_PlayerName; |
| | | [SerializeField] Text m_KillTime; |
| | | [SerializeField] UIEffect m_Effect; |
| | | [SerializeField] Button m_RedPack; |
| | | [SerializeField] RedpointBehaviour redPonint; |
| | | |
| | | BossFirstBloodModel model |
| | | { |
| | |
| | | |
| | | m_NPCNameLV.text = npcConfig.charName + " LV." + npcConfig.NPCLV; |
| | | |
| | | //首杀 未击杀红包正常亮,已击杀未领取显示特效红点,已领取置灰 |
| | | redPonint.redpointId = model.GetNPCRedPackPointID(npcID); |
| | | model.UpdateRedPackPoint(npcID); |
| | | ShowKillInfo(npcID); |
| | | |
| | | m_RedPack.RemoveAllListeners(); |
| | | m_RedPack.AddListener(() => |
| | | { |
| | | ClickRedPack(npcID); |
| | | }); |
| | | |
| | | } |
| | | |
| | | private void ClickRedPack(int npcID) |
| | | { |
| | | var state = model.GetBossKillAwardState(npcID); |
| | | |
| | | if (state == 1) |
| | | { |
| | | SendGetAward(npcID, 0); |
| | | return; |
| | | } |
| | | var npcConfig = NPCConfig.Get(npcID); |
| | | if (state == 0) |
| | | SysNotifyMgr.Instance.ShowTip("NoBossFirstKill", npcConfig.charName); |
| | | else if (state == 2) |
| | | SysNotifyMgr.Instance.ShowTip("GetBossFirstKillAwardYet", npcConfig.charName); |
| | | } |
| | | |
| | | public void ShowKillInfo(int npcID) |
| | |
| | | }); |
| | | } |
| | | } |
| | | // 红包状态 |
| | | var state = model.GetBossKillAwardState(npcID); |
| | | if (state == 0) |
| | | { |
| | | m_RedPack.SetColorful(null, true); |
| | | m_Effect.Stop(); |
| | | } |
| | | else if (state == 1) |
| | | { |
| | | m_RedPack.SetColorful(null, true); |
| | | m_Effect.Play(); |
| | | } |
| | | else if (state == 2) |
| | | { |
| | | m_RedPack.SetColorful(null, false); |
| | | m_Effect.Stop(); |
| | | } |
| | | |
| | | } |
| | | protected override void BindController() |
| | | { |