Postado Outubro 7, 2015 9 anos Const DiagnoalWalking = 1 // 1- Ativar diagonal e 0- desativar. procedure Event_KeyDown(Key:integer); begin Updateworld; case Key of 87:Self.MoveUp; //W 65:Self.MoveLeft; //A 83:self.MoveDown; //S 68:Self.MoveRight; //D end; if DiagnoalWalking then Case Key of 81:Self.MoveUpLeft; //Q 69:Self.MoveUpRight; //E 90:Self.MoveDownLeft; //Z 67:Self.MoveDownRight; //C end; end; while not terminated do begin ProcessEvents; Sleep(100); end; Créditos: ngmax
Participe da conversa
Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.