|
|
|
@ -128,7 +128,7 @@ public class WaterFightFire : MonoBehaviour
|
|
|
|
|
|
|
|
|
|
private void OnDontinCollider(List<ParticleSystem.Particle> inside) |
|
|
|
|
{ |
|
|
|
|
if (CurrentUserInfo.mySelf.Id == CurrentUserInfo.room.Owner.UserInfo.Id) |
|
|
|
|
if (CurrentUserInfo.room!=null&&CurrentUserInfo.mySelf.Id == CurrentUserInfo.room.Owner.UserInfo.Id) |
|
|
|
|
{ |
|
|
|
|
//水枪移出火堆 |
|
|
|
|
timer -= Time.deltaTime; |
|
|
|
@ -180,7 +180,7 @@ public class WaterFightFire : MonoBehaviour
|
|
|
|
|
void OnInSideCollider(List<ParticleSystem.Particle> insides) |
|
|
|
|
{ |
|
|
|
|
|
|
|
|
|
if (CurrentUserInfo.mySelf.Id == CurrentUserInfo.room.Owner.UserInfo.Id) |
|
|
|
|
if (CurrentUserInfo.room!=null&&CurrentUserInfo.mySelf.Id == CurrentUserInfo.room.Owner.UserInfo.Id) |
|
|
|
|
{ |
|
|
|
|
timer -= Time.deltaTime; |
|
|
|
|
if (timer < 0) |
|
|
|
@ -359,7 +359,7 @@ public class WaterFightFire : MonoBehaviour
|
|
|
|
|
|
|
|
|
|
public void OnDisable() |
|
|
|
|
{ |
|
|
|
|
if (Target != null) |
|
|
|
|
if (Target != null&&Target.GetComponent<FireFightNormal>()) |
|
|
|
|
{ |
|
|
|
|
if (Target.GetComponent<FireFightNormal>().Straightwater.Contains(this)) |
|
|
|
|
Target.GetComponent<FireFightNormal>().Straightwater.Remove(this); |
|
|
|
@ -371,7 +371,7 @@ public class WaterFightFire : MonoBehaviour
|
|
|
|
|
|
|
|
|
|
public void OnDestroy() |
|
|
|
|
{ |
|
|
|
|
if (Target != null) |
|
|
|
|
if (Target != null && Target.GetComponent<FireFightNormal>()) |
|
|
|
|
{ |
|
|
|
|
if (Target.GetComponent<FireFightNormal>().Straightwater.Contains(this)) |
|
|
|
|
Target.GetComponent<FireFightNormal>().Straightwater.Remove(this); |
|
|
|
|