提交 83ecdb60 编写于 作者: 5 572801922@qq.com

修复层级导致的炮塔攻击失效问题

......@@ -64,7 +64,7 @@ public class BuildingManager : SingletonAutoMono<BuildingManager>
}
void PutTurret()
{
if (turretList[index].GetComponent<Turret>().MSRequirement > GameManager.Instance.magicStone)
if (turretList[index].GetComponent<Turret>().turretData.MSRequirement > GameManager.Instance.magicStone)
return;
foreach (Collider2D c in Physics2D.OverlapCircleAll(mouseVisualTransfrom.position, 1f))
{
......
......@@ -34,7 +34,7 @@ public class DoorControllTrigger : MonoBehaviour
}
if (player != null && other.name == player.name && isVehicleUpdated)
{
Debug.Log(other.name + " " + player.name);
//Debug.Log(other.name + " " + player.name);
if (!isPlayerUpdated)
{
isPlayerUpdated = true;
......
......@@ -13,10 +13,6 @@ public class NormalTurret : Turret
sprite = GetComponent<SpriteRenderer>();
sprite.sprite = FindSrpite();
}
private void Start()
{
Init();
}
protected override void Update()
{
base.Update();
......
......@@ -33,7 +33,7 @@ public abstract class Turret : BattleUnit, Interactable
public int MSRequirement;
private int baseMSRequirement;
protected int destoryReturnMS;
protected List<BattleUnit> enemyList = new List<BattleUnit>();
public List<BattleUnit> enemyList = new List<BattleUnit>();
protected float timer;
private int layer;
private bool canShoot = false;
......@@ -68,7 +68,7 @@ public abstract class Turret : BattleUnit, Interactable
{
data = new UpgradeData();
data.type = UpgradeType.Turret;
layer = LayerMask.GetMask("Door", "Wall", "Room", "Enemy");
layer = LayerMask.GetMask("Door", "Wall", "Enemy");
currentCD = 0;
level = 1;
BattleUnitData_SO battleUnitData = turretData.battleUnitData;
......
......@@ -40,7 +40,7 @@ public abstract class Bullet : MonoBehaviour
}
}
Vector3 hitPos = collision.bounds.ClosestPoint(transform.position);
Debug.Log("撞击到" + collision.name);
//Debug.Log("撞击到" + collision.name);
//调用特效
PlayeEffect(hitPos);
PoolMgr.Instance.PushObj(gameObject.name, gameObject);
......
......@@ -22,7 +22,7 @@ public class NormalBullet : Bullet
if (MoveDistance > BulletRange)
{
//回收
Debug.Log("超过距离回收");
//Debug.Log("超过距离回收");
PoolMgr.Instance.PushObj(gameObject.name, gameObject);
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册