public override void ComputeInformations(Buster buster) { // If we were capturing and the ghost flew away, or we capture a ghost but we're not in range to drop it if (!buster.CanCapture() || (buster.GhostCaptured != null && !buster.IsHoldingAGhost())) { buster.State = BusterState.MoveState; } // If we were capturing and we're already in range for drop if (buster.CanRelease()) { buster.State = BusterState.ReleaseState; } }
public override void ComputeInformations(Buster buster) { // If we've drop our ghost we can now move if (!buster.IsHoldingAGhost()) { buster.State = BusterState.MoveState; } // If we've drop our ghost and a ghost is in range if (!buster.IsHoldingAGhost() && buster.CanCapture()) { buster.State = BusterState.CaptureState; } }