Show
Ignore:
Timestamp:
10/04/08 14:32:30 (3 months ago)
Author:
mokehehe
Message:

プレーヤーとの当たり判定追加

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • lang/haskell/nario/Player.hs

    r20670 r20673  
    88        getScrollPos, 
    99        getPlayerYPos, 
     10        getPlayerHitRect, 
    1011        getPlayerMedal, 
    1112        getPlayerScore 
    1213) where 
    1314 
    14 import Multimedia.SDL hiding (Event) 
     15import Multimedia.SDL (blitSurface, pt) 
    1516 
    1617import Util 
    17 import AppUtil 
     18import AppUtil (KeyProc, isPressed, PadBtn(..), cellCrd, KeyState(..), getImageSurface, Rect(..)) 
    1819import Const 
    1920import Images 
     
    200201getPlayerYPos = (`div` one) . y 
    201202 
     203-- 当たり判定用矩形 
     204getPlayerHitRect :: Player -> Rect 
     205getPlayerHitRect self = Rect (xx - 6) (yy - 16) (xx + 6) yy 
     206        where 
     207                xx = x self `div` one 
     208                yy = y self `div` one 
     209 
    202210-- メダル枚数取得 
    203211getPlayerMedal :: Player -> Int