Hallo, in folgenden Script-Schnipsel sollen dieTasten Kombinationen um Shift (z,B. KP_9 + Shift links) ergänzt werden. Hab es schon versucht aber nicht hinbekommen.
Bitte um Hilfe
Spoiler anzeigen
--
function ICrane:keyEvent(unicode, sym, modifier, isDown)
if sym == Input.KEY_KP_6 then
self.translationMin = isDown;
self.translationHookMin = isDown;
end;
if sym == Input.KEY_KP_9 then
self.translationMax = isDown;
self.translationHookMax = isDown;
end;
if sym == Input.KEY_KP_4 then
self.rotation1Min = isDown;
self.translationHydMin = isDown;
end;
if sym == Input.KEY_KP_7 then
self.rotation1Max = isDown;
self.translationHydMax = isDown;
end;
if sym == Input.KEY_KP_8 then
self.rotation2Min = isDown;
end;
if sym == Input.KEY_KP_5 then
self.rotation2Max = isDown;
end;
if sym == Input.KEY_KP_0 then
self.rotation5Max = isDown;
end;
if sym == Input.KEY_KP_2 then
self.rotation5Min = isDown;
end;
if sym == Input.KEY_j then
self.rotation6Max = isDown;
end;
if sym == Input.KEY_k then
self.rotation6Min = isDown;
end;
if sym == Input.KEY_n then
self.rotation4Max = isDown;
end;
if sym == Input.KEY_m then
self.rotation4Min = isDown;
end;
end;
function ICrane:update(dt)