public class

Paddle

extends RectangleShape
java.lang.Object
   ↳ sofia.graphics.Shape
     ↳ sofia.graphics.StrokedShape
       ↳ sofia.graphics.FillableShape
         ↳ sofia.graphics.RectangleShape
           ↳ sofia.demos.pong.Paddle

Class Overview

A paddle in the Pong game.

Summary

Public Constructors
Paddle(RectF bounds)
Creates a new Paddle with the specified bounds.
Public Methods
void movePaddleTo(float y)
Moves the paddle to the specified y-coordinate.
[Expand]
Inherited Methods
From class sofia.graphics.RectangleShape
From class sofia.graphics.FillableShape
From class sofia.graphics.StrokedShape
From class sofia.graphics.Shape
From class java.lang.Object

Public Constructors

public Paddle (RectF bounds)

Creates a new Paddle with the specified bounds.

Parameters
bounds the bounds

Public Methods

public void movePaddleTo (float y)

Moves the paddle to the specified y-coordinate.

Parameters
y the y-coordinate of the center of the paddle