Back to project page killingspree.
The source code is released under:
MIT License
If you think the Android project killingspree listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.sillygames.killingSpree.networking.messages; //from ww w . j av a 2 s.co m import com.sillygames.killingSpree.pool.Poolable; public class ControlsMessage implements Poolable{ // left | right | up | down | jump | shoot public byte buttonPresses = 0; public boolean shoot() { return (buttonPresses & 0x01) > 0; } public boolean jump() { return (buttonPresses & 0x02) > 0; } public boolean down() { return (buttonPresses & 0x04) > 0; } public boolean up() { return (buttonPresses & 0x08) > 0; } public boolean right() { return (buttonPresses & 0x10) > 0; } public boolean left() { return (buttonPresses & 0x20) > 0; } public boolean throwBomb() { return (buttonPresses & 0x40) > 0; } @Override public void reset() { buttonPresses = 0; } }