Back to project page Sertimus.
The source code is released under:
GNU General Public License
If you think the Android project Sertimus listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
/* Sertimus - A live wallpaper featuring a cute Chao. /* w w w .j a va2s . c o m*/ Copyright (C) 2013 Kevin Negrin This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ /* CharacterAnimation.java - Enumerated type containing a set of predefined * constants that determine the animation being used from a sprite sheet. */ package gameaddict30.wallpaper.sertimus.constants; import java.util.Arrays; public enum CharacterAnimation { ANIMATION_IDLE_F(0), ANIMATION_WALK_F(1), ANIMATION_IDLE_B(2), ANIMATION_WALK_B(3); private int row, frameSequence[], delay=1; private CharacterAnimation(int a) { if (a == 0 || a == 2) { row = (a == 0) ? 0 : 1; frameSequence = new int[] {0}; } if (a == 1 || a == 3) { row = (a == 1) ? 0 : 1; frameSequence = new int[] {0,1,0,2}; delay = 10; } } public int getRow() { return row; } public int[] getFrameSequence() { return Arrays.copyOf(frameSequence, frameSequence.length); } public int getDelay() { return delay; } }