示例#1
0
Tile::Tile(Vector2 position, Color color)
{
	SetDrawShape(actorDrawShape::ADS_Square);
	SetSize(Size, Size);
	
	SetPosition(Size * position.X + (Size / 2), Size * -1 * position.Y - (Size / 2));
	SetColor(color);
}
MazeFinder::MazeFinder()
{
	SetColor(1, 0, 0);
	SetSize(0.75f);
	SetDrawShape(ADS_Circle);
	theSwitchboard.SubscribeTo(this, "MazeFinderPathPointReached");
	theSwitchboard.SubscribeTo(this, "MouseDown");
	_pathIndex = 0;
}
示例#3
0
Shape::Shape(Vector2 startingPosition) {
  SetName("Blocky");

  SetPosition(startingPosition);

  _jumpTimeout = -1.0f;
  _onGround = true;

  SetColor(0.0f, 1.0f, 0.0f, 1.0f);
  SetDrawShape(ADS_Square);
  SetSize(2.0f);
  // SetSprite("Resources/Images/sven.png");
  SetFixedRotation(true);
  InitPhysics();
}
示例#4
0
Experience::Experience(Vector2 pos)
{
	_setUp = false;
	_speed = 10.0f;
	SetIsSensor(true); // make not collidable
	pos.X += (MathUtil::RandomFloat(1.0) - 0.5);
	pos.Y += (MathUtil::RandomFloat(1.0) - 0.5);
	SetSprite("Resources/Images/exp1.png");
	SetPosition(pos);
	SetDrawShape(ADS_Square);
	SetSize(MathUtil::RandomFloat(0.4) + 0.2);
	//SetColor(0, 0.8, 0);
	Untag("Enemy");
	Tag("Experience");
	InitPhysics();
	theWorld.Add(this);
}