ProjectilePrisonerRock::ProjectilePrisonerRock(bool bDirection, int xPos, int yPos)
{
	/* Set Sprite Number */
	SetSprite(1, CR::AssetList::prisoner_rock);

	/* Set Sprite Direction */
	SetDirection(bDirection);

	/* Set Weapon Bounding Box */
	SetWeaponBounds(12,12);

	/* Set Activate & Delay Timer */
	SetActiveTime(3);
	SetDelayTime(.25);

	/* Set Velocity Direction */	
	if(bDirection) SetVelocityVector((float)(rand()%50+75), 0);
	else SetVelocityVector((float)(-(rand()%50+75)), 0);

	/* Set Acceleration Vector */
	SetAccelerationVector(0, (float)(rand()%75 + 65));
	
	/* Set Start Position */
	SetPosition(xPos, yPos);

	/* Set Damage Value */
	SetWeaponDamage(5);

	proj_flags.S_NON_PROJECTILE = true;

	/* Initialize Sprite */
	SetAnimation(0, 0, true, false, 10, true);
}
ProjectileNinjaStar::ProjectileNinjaStar(bool bDirection, int xPos, int yPos)
{
	/* Set Sprite Number */
	SetSprite(1, CR::AssetList::ninja_star);


	/* Set Sprite Direction */
	SetDirection(bDirection);

	/* Set Weapon Bounding Box */
	SetWeaponBounds(16,16);

	/* Set Activate & Delay Timer */
	SetActiveTime(4);
	SetDelayTime(.25);

	/* Set Velocity Direction */
	if(bDirection) SetVelocityVector(80, 0);
	else SetVelocityVector(-80, 0);

	/* Set Start Position */
	SetPosition(xPos, yPos);

	/* Set Damage Value */
	SetWeaponDamage(2);	
	
	/* Initialize Sprite */
	SetAnimation(0, 0, true, false, 30, true);
	projectile_spr->EnableFrameSkip(false);
}
Beispiel #3
0
HeNodeB::HeNodeB ( int idElement,
	    		   Femtocell *cell)
{
  SetIDNetworkNode (idElement);
  SetNodeType(NetworkNode::TYPE_HOME_BASE_STATION);
  SetFemtoCell (cell);
  SetActiveTime(Simulator::Init()->Now());

  double pos_X = cell->GetCellCenterPosition()->GetCoordinateX();
  double pos_Y = cell->GetCellCenterPosition()->GetCoordinateY();

  CartesianCoordinates *position = new CartesianCoordinates(pos_X, pos_Y);
  Mobility* m = new ConstantPosition ();
  m->SetAbsolutePosition (position);
  SetMobilityModel (m);

  CreateUserEquipmentRecords();

  HenbLtePhy *phy = new HenbLtePhy ();
  phy->SetDevice(this);
  SetPhy (phy);

  ProtocolStack *stack = new ProtocolStack (this);
  SetProtocolStack (stack);

  Classifier *classifier = new Classifier ();
  classifier->SetDevice (this);
  SetClassifier (classifier);
}
ProjectilePoints::ProjectilePoints(int xPos, int yPos, int nPoints, int fnt, bool type)
{
	this->nPoints = static_cast<int>(nPoints*modifier);

	S_FLICKER = false;

	/* Set Activate & Delay Timer */
	SetActiveTime(3);
	SetDelayTime(0);

	/* Set Start Position */
	SetPosition(xPos, yPos);
	
	SetVelocityVector(0, -20);

	SetSource(true);
	proj_flags.S_NON_PROJECTILE = true;

	bType = type;

	switch(fnt)
	{
	case 0:
		this->fnt = fnt_yellow;
		break;
	case 1:
		this->fnt = fnt_red;
		break;
	case 2:
		this->fnt = fnt_green;
		break;
	case 3:
		this->fnt = fnt_blue;
		break;
	case 4:
		this->fnt = fnt_blue;
		S_FLICKER = true;
		break;
	}
}