/** Transitions from the color at the time this action starts to the specified color. */ static public ColorAction color (Color color, float duration, Interpolation interpolation) { ColorAction action = action(ColorAction.class); action.setEndColor(color); action.setDuration(duration); action.setInterpolation(interpolation); return action; }
Color color = new Color(Color.WHITE); ColorAction colorAction = new ColorAction(); public MyGame() { colorAction.setColor(color); colorAction.setDuration(2); colorAction.setEndColor(Color.RED); } public void render(float delta) { Gdx.gl.glClearColor(color.r, color.g, color.b, color.a); Gdx.gl.glClear(GL20.GL_COLOR_BUFFER_BIT); colorAction.act(delta); }
/** Transitions from the color at the time this action starts to the specified color. */ static public ColorAction color (Color color, float duration, Interpolation interpolation) { ColorAction action = action(ColorAction.class); action.setEndColor(color); action.setDuration(duration); action.setInterpolation(interpolation); return action; }
/** Transitions from the color at the time this action starts to the specified color. */ static public ColorAction color (Color color, float duration, Interpolation interpolation) { ColorAction action = action(ColorAction.class); action.setEndColor(color); action.setDuration(duration); action.setInterpolation(interpolation); return action; }