Exemple #1
0
		public void ForceUpdateController()
		{
			controller = Fraction.CreateController(this.GDOwner(), this);
		}
Exemple #2
0
		public override void OnInitialize(EntityManager manager)
		{
			controller = Fraction.CreateController(this.GDOwner(), this);

			PhysicsBody = BodyFactory.CreateBody(this.GDManager().PhysicsWorld, ConvertUnits.ToSimUnits(Center), 0, BodyType.Static);

			PhysicsFixtureBase = FixtureFactory.AttachCircle(
				ConvertUnits.ToSimUnits(Scale * CANNON_DIAMETER / 2), 1,
				PhysicsBody,
				Vector2.Zero, this);

			PhysicsFixtureBarrel = FixtureFactory.AttachRectangle(
				ConvertUnits.ToSimUnits(Scale * BARREL_WIDTH), ConvertUnits.ToSimUnits(Scale * BARREL_HEIGHT), 1, 
				new Vector2(ConvertUnits.ToSimUnits(Scale * CANNON_DIAMETER / 2), 0),
				PhysicsBody, this);
		}
Exemple #3
0
		private void SetFraction(Fraction f)
		{
			Fraction = f;
			ResetChargeAndBooster();
			controller = Fraction.CreateController(this.GDOwner(), this);
		}