1
This commit is contained in:
@@ -1,10 +1,14 @@
|
||||
using System.Collections;
|
||||
using Assets.MyGame.Scripts.Net.APIResponses.Enum;
|
||||
using DG.Tweening;
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using TMPro;
|
||||
using UnityEngine;
|
||||
using UnityEngine.AddressableAssets;
|
||||
using UnityEngine.ResourceManagement.AsyncOperations;
|
||||
using static MonsterMoveLine;
|
||||
using Random = UnityEngine.Random;
|
||||
|
||||
public class MonsterControl_BossBase : MonsterContral
|
||||
{
|
||||
@@ -17,6 +21,7 @@ public class MonsterControl_BossBase : MonsterContral
|
||||
public long bossScoreValue=0;//boss分数
|
||||
public int poolNum;//奖池
|
||||
public int prizeCount;//奖励数量
|
||||
public Action JiaFen;
|
||||
|
||||
public override void Awake()
|
||||
{
|
||||
@@ -33,7 +38,8 @@ public class MonsterControl_BossBase : MonsterContral
|
||||
{
|
||||
tMP_CurrBossScore = Instantiate(CreateFishManager.Instance.dieFXPrefabAwardTmp, CreateFishManager.Instance.currGameType.subPanelParent).transform.GetChild(0).GetComponent<TextMeshProUGUI>();
|
||||
}
|
||||
var v = layeredPool.BossGlodCoinRandrom();
|
||||
|
||||
var v = layeredPool.BossGlodCoinRandrom(tMP_CurrBossScore.transform.position);
|
||||
foreach (var item in v)
|
||||
{
|
||||
bossScoreValue += item.Amount;
|
||||
@@ -53,7 +59,7 @@ public class MonsterControl_BossBase : MonsterContral
|
||||
{
|
||||
tMP_CurrBossScore = Instantiate(CreateFishManager.Instance.dieFXPrefabAwardTmp, CreateFishManager.Instance.currGameType.subPanelParent).transform.GetChild(0).GetComponent<TextMeshProUGUI>();
|
||||
}
|
||||
var v = layeredPool.BossGlodCoin(sss);
|
||||
var v = layeredPool.BossGlodCoin(sss, tMP_CurrBossScore.transform.position);
|
||||
foreach (var item in v)
|
||||
{
|
||||
bossScoreValue += item.Amount;
|
||||
@@ -62,7 +68,7 @@ public class MonsterControl_BossBase : MonsterContral
|
||||
}
|
||||
IEnumerator ShowBigPrize(long turretNum)
|
||||
{
|
||||
|
||||
yield return new WaitForSeconds(1);
|
||||
turretNum =Random.Range((int)(turretNum/2), (int)turretNum+1);
|
||||
while (currBossScoreValue < bossScoreValue)
|
||||
{
|
||||
@@ -82,10 +88,11 @@ public class MonsterControl_BossBase : MonsterContral
|
||||
}
|
||||
public async override void Init(string pathId, float Time, bool isyuzhen = false, string yzID = "")
|
||||
{
|
||||
|
||||
|
||||
isyz = isyuzhen;
|
||||
this.yzID = yzID;
|
||||
|
||||
|
||||
//播报
|
||||
switch (GameManager.Instance.gameData.currGameType)
|
||||
{
|
||||
@@ -140,5 +147,15 @@ public class MonsterControl_BossBase : MonsterContral
|
||||
BezierCurveData bezierCurveData = MonsterMoveLine.dic_BezierCurveDatas[bossName + pathId];
|
||||
monsterData.moveLine.Init(bezierCurveData, Time);
|
||||
}
|
||||
public override void OnDestroy()
|
||||
{
|
||||
base.OnDestroy();
|
||||
tMP_CurrBossScore.transform.parent.DOMove(CreateFishManager.Instance.currGameType.currSitData.tMP_GoldNum.transform.position, 0.5f).OnComplete(() =>
|
||||
{
|
||||
JiaFen?.Invoke();
|
||||
|
||||
Destroy(tMP_CurrBossScore.transform.parent.gameObject);
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user