Keimar
2008年02月29日 19:40
//----------------------------------------
var.FL = Wiimote2.BalanceBoard.RawFrontLeft
var.FR = Wiimote2.BalanceBoard.RawFrontRight
var.BL = Wiimote2.BalanceBoard.RawBackLeft
var.BR = Wiimote2.BalanceBoard.RawBackRight
debug = var.FL+ " : " + var.FR + " : " + var.BL + " : " + var.BR
//----------------------------------------
//----------------------------------------
var.FL = Wiimote2.BalanceBoard.RawFrontLeft
if var.FL < 9900 then
nbsp;var.FLFlag = 1
else if var.FL > 10600 then
var.FLFlag = -1
else
var.FLFlag = 0
end if
//----------------------------------------
//----------------------------------------
if var.FLFlag = 1 and var.FRFlag = 1 and var.BLFlag = 1 and var.BRFlag = 1 then
PPJoy1.Analog1 = -1
Key.Up = true
Key.Down = false
else if var.FLFlag = -1 and var.FRFlag = -1 and var.BLFlag = 0 and var.BRFlag = -1 then
PPJoy1.Analog1 = 1
Key.Down = true
Key.Up = false
else
PPJoy1.Analog1 = 0
Key.Up = false
Key.Down = false
end if
//----------------------------------------
//----------------------------------------
// input
var.FL = Wiimote2.BalanceBoard.RawFrontLeft
var.FR = Wiimote2.BalanceBoard.RawFrontRight
var.BL = Wiimote2.BalanceBoard.RawBackLeft
var.BR = Wiimote2.BalanceBoard.RawBackRight
if var.FL < 9900 then
var.FLFlag = 1
else if var.FL > 10600 then
var.FLFlag = -1
else
var.FLFlag = 0
end if
if var.FR > 4700 then
var.FRFlag = 1
else if var.FR < 3800 then
var.FRFlag = -1
else
var.FRFlag = 0
end if
if var.BL < 4700 then
var.BLFlag = 1
else if var.BL < 5300 then
var.BLFlag = -1
else
var.BLFlag = 0
end if
if var.BR > 3300 then
var.BRFlag = 1
else if var.BR < 2500 then
var.BRFlag = -1
else
var.BRFlag = 0
end if
if var.FLFlag = 1 and var.FRFlag = 1 and var.BLFlag = 1 and var.BRFlag = 1 then
PPJoy1.Analog1 = -1
Key.Up = true
Key.Down = false
else if var.FLFlag = -1 and var.FRFlag = -1 and var.BLFlag = 0 and var.BRFlag = -1 then
PPJoy1.Analog1 = 1
Key.Down = true
Key.Up = false
else
PPJoy1.Analog1 = 0
Key.Up = false
Key.Down = false
end if
if var.FLFlag = -1 and var.BLFlag = 1 and var.BRFlag = 0 then
PPJoy1.Analog0 = 1
Key.Right = true
Key.Left = false
else if var.FLFlag = 1 and var.FRFlag = 0 and var.BLFlag = 0 and var.BRFlag = 1 then
PPJoy1.Analog0 = -1
Key.Left = true
Key.Right= false
else
PPJoy1.Analog0 = 0
Key.Right= false
Key.Left = false
end if
debug =var.FLFlag + " : " + var.FRFlag + " : " + var.BLFlag + " : " + var.BRFlag
//----------------------------------------