我有這個long if語句。它給我的錯誤> =操作數不能應用於Bool和Float類型
>= Operand cannot be applied to types Bool and Float
if (tl.State == TouchLocationState.Pressed &&
(tl.Position.X >= harePlayer.Position.X >= tl.Position.X &&
tl.Position.Y >= harePlayer.Position.Y &&
harePlayer.Position.X <= (harePlayer.Position.X + 52) &&
tl.Position.Y <= (harePlayer.Position.Y + 50)))
誰能告訴我的解決辦法是什麼呢?謝謝。 :)
無關的,但'harePlayer.Position.X <=(harePlayer.Position.X + 52)'總是真除非harePlayer.Position.X是NaN的。 – Kyle