extract-input-controllers #4
|
@ -392,8 +392,8 @@ function Game:updateBatting(batDeg, batSpeed)
|
||||||
local batAngle = math.rad(batDeg)
|
local batAngle = math.rad(batDeg)
|
||||||
-- TODO: animate bat-flip or something
|
-- TODO: animate bat-flip or something
|
||||||
local batter = self.baserunning.batter
|
local batter = self.baserunning.batter
|
||||||
self.state.batBase.x = batter and (batter.x + C.BatterHandPos.x) or 0
|
self.state.batBase.x = batter and (batter.x + C.BatterHandPos.x) or -999
|
||||||
self.state.batBase.y = batter and (batter.y + C.BatterHandPos.y) or 0
|
self.state.batBase.y = batter and (batter.y + C.BatterHandPos.y) or -999
|
||||||
self.state.batTip.x = self.state.batBase.x + (C.BatLength * math.sin(batAngle))
|
self.state.batTip.x = self.state.batBase.x + (C.BatLength * math.sin(batAngle))
|
||||||
self.state.batTip.y = self.state.batBase.y + (C.BatLength * math.cos(batAngle))
|
self.state.batTip.y = self.state.batBase.y + (C.BatLength * math.cos(batAngle))
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue