修复掉落两次奖励

This commit is contained in:
wulongxiao 2024-12-28 10:27:09 +08:00
parent c04f3f2ed9
commit 53e24b624e

View File

@ -1,19 +1,11 @@
using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.Drawing;
using System.Linq;
using System.Reflection;
using System.Threading.Tasks;
using UnityEditor;
using UnityEngine;
using UnityEngine.UI;
using UnityEngine.UIElements;
using Debug = UnityEngine.Debug;
using Image = UnityEngine.UI.Image;
using DG.Tweening;
using UnityEngine.SocialPlatforms;
public enum Camp
{/// <summary>
/// 鯤소
@ -117,8 +109,8 @@ public class Role : Fun
}
}
[Header("掉落")] public float gold = 10f;
public float Gold
[Header("掉落")] public int gold = 6;
public int Gold
{
[DebuggerStepThrough]
get => gold;
@ -219,7 +211,7 @@ public class Role : Fun
public void AddBuff(List<Action<Role>> buffs, Action<Role> buffAction)
{
buffs.Add(buffAction);
Debug.LogError(this.name + "添加buff到"+ buffs);
UnityEngine.Debug.LogError(this.name + "添加buff到"+ buffs);
}
/// <summary>
@ -229,7 +221,7 @@ public class Role : Fun
{
foreach (var buff in PlayerBuff)
{
Debug.LogError(this.name + "进入执行buff判断");
UnityEngine.Debug.LogError(this.name + "进入执行buff判断");
buff.Invoke(this); // 쉥菱성鱗槨커깃눈뒵
}
@ -324,14 +316,11 @@ public class Role : Fun
if (!IsDead)
{
UIContorl.instance.Killnumber++;
//Destroy(gameObject);
SkillBox.instance.AddExperience(gold, this.gameObject.transform);
IsDead = true;
}
HaveDieTime++;
Debug.Log("die");
}
}
/// <summary>
@ -408,7 +397,7 @@ public class Role : Fun
Level = 1;
// 路零쏜귑
Gold = 10f;
Gold = 10;
// 헌왕 Buff 죗깊
buffList.Clear();