Compare commits

..

No commits in common. "4eb6e3c01dbb65dfd9e2db0ef57964182131c51d" and "88af3457adafcf39247f083ac305476b7b83a6e3" have entirely different histories.

2 changed files with 56 additions and 59 deletions

View File

@ -119,20 +119,15 @@ public class Bullet : MonoBehaviour
private void OnTriggerEnter2D(Collider2D collision) private void OnTriggerEnter2D(Collider2D collision)
{ {
if (NumberOfBulletAttacks > 0)
{
NumberOfBulletAttacks -= 1;
//Debug.Log("½øÈë¼ì²â·¶Î§");
Role Crole = collision.gameObject.GetComponent<Role>(); Role Crole = collision.gameObject.GetComponent<Role>();
if (Crole) if (Crole)
{ {
if (Crole.camp != role.camp) if (Crole.camp != role.camp)
{ {
if (NumberOfBulletAttacks < 0)
{
return;
}
else
{
NumberOfBulletAttacks -= 1;
}
foreach (var buff in role.storageBuff) foreach (var buff in role.storageBuff)
{ {
if (!Crole.PlayerBuff.Contains(buff)) if (!Crole.PlayerBuff.Contains(buff))
@ -191,6 +186,7 @@ public class Bullet : MonoBehaviour
} }
} }
}
if (bulletAttributes == BulletAttributes.Water) //ˮ if (bulletAttributes == BulletAttributes.Water) //ˮ
{ {
@ -206,8 +202,13 @@ public class Bullet : MonoBehaviour
} }
} }
} }
} }
else
{
}
} }
private float lastDamageTime = 0f; private float lastDamageTime = 0f;
private void OnTriggerStay2D(Collider2D collision) private void OnTriggerStay2D(Collider2D collision)

View File

@ -36,10 +36,6 @@ public enum CharacterFlags
land = 1 << 1, land = 1 << 1,
big = 1 << 2, big = 1 << 2,
min = 1 << 3, min = 1 << 3,
FlyBig=fly|big,
FlyMin=fly|min,
LandBig = land | big,
LandMin = land | min,
} }
/// <summary> /// <summary>