public static bool UpdatePlayer(uint id, ref PlayerBall ball) { bool PlayerDeadFlag = false; foreach (var obj in PlayerBallMgr.ToList()) { if (obj.Key != id && CanEat(ball, obj.Value)) { PlayerDeadFlag = true; ball.Radius += obj.Value.Radius; PlayerBallMgr.Dead(obj.Key); } } return(PlayerDeadFlag); }
public static bool UpdateOtherPlayer(uint id, PlayerBall ball, out uint EatId) { bool PlayerDeadFlag = false; uint did = 0; foreach (var obj in PlayerBallMgr.ToList()) { if (obj.Key != id && CanEat(obj.Value, ball)) { PlayerDeadFlag = true; did = obj.Key; PlayerBallMgr.Dead(id); break; } } EatId = did; return(PlayerDeadFlag); }