YourCityInvadedByAliens
Documentation for code of the game
Public Member Functions | Private Attributes | List of all members
YPos Class Reference

#include <ypos.h>

Public Member Functions

 YPos ()
 
 YPos (int x, int y)
 
int getX () const
 
int getY () const
 
void update (int x, int y)
 
void update (const YPos &coord)
 
void setX (int x)
 
void setY (int y)
 
YPosoperator+= (const YPos &other)
 
YPosoperator-= (const YPos &other)
 
YPos operator+ (const YPos &other) const
 
YPos operator- (const YPos &other) const
 
bool operator> (const YPos &other) const
 
bool operator< (const YPos &other) const
 
bool isInsideRect (const YPos &topLeft, const YPos &bottomRight) const
 
float getDistance (const YPos &pos) const
 

Private Attributes

int m_nX
 
int m_nY
 

Constructor & Destructor Documentation

◆ YPos() [1/2]

YPos::YPos ( )

◆ YPos() [2/2]

YPos::YPos ( int  x,
int  y 
)

Member Function Documentation

◆ getDistance()

float YPos::getDistance ( const YPos pos) const

◆ getX()

int YPos::getX ( ) const

◆ getY()

int YPos::getY ( ) const

◆ isInsideRect()

bool YPos::isInsideRect ( const YPos topLeft,
const YPos bottomRight 
) const

◆ operator+()

YPos YPos::operator+ ( const YPos other) const

◆ operator+=()

YPos & YPos::operator+= ( const YPos other)

◆ operator-()

YPos YPos::operator- ( const YPos other) const

◆ operator-=()

YPos & YPos::operator-= ( const YPos other)

◆ operator<()

bool YPos::operator< ( const YPos other) const

◆ operator>()

bool YPos::operator> ( const YPos other) const

◆ setX()

void YPos::setX ( int  x)

◆ setY()

void YPos::setY ( int  y)

◆ update() [1/2]

void YPos::update ( const YPos coord)

◆ update() [2/2]

void YPos::update ( int  x,
int  y 
)

Member Data Documentation

◆ m_nX

int YPos::m_nX
private

◆ m_nY

int YPos::m_nY
private

The documentation for this class was generated from the following files: