Esempio n. 1
0
		public PShape(bool randColor) {
			_fric = 0.5F;
			_rest = 0.5F;
			_localPos = new Vector2f();
			_pos = new Vector2f();
			_mAng = new PTransformer();
			_aabb = new AABB();
			_sapAABB = new PSortableAABB();
			_type = Physics.PShapeType.NULL_SHAPE;
			_rnd = randColor;
			if (randColor) {
				SetColor((int) (MathUtils.Random() * 160F + 96F),
						(int) (MathUtils.Random() * 160F + 96F),
						(int) (MathUtils.Random() * 160F + 96F));
			}
		}
Esempio n. 2
0
 public PShape(bool randColor)
 {
     _fric     = 0.5F;
     _rest     = 0.5F;
     _localPos = new Vector2f();
     _pos      = new Vector2f();
     _mAng     = new PTransformer();
     _aabb     = new AABB();
     _sapAABB  = new PSortableAABB();
     _type     = Physics.PShapeType.NULL_SHAPE;
     _rnd      = randColor;
     if (randColor)
     {
         SetColor((int)(MathUtils.Random() * 160F + 96F),
                  (int)(MathUtils.Random() * 160F + 96F),
                  (int)(MathUtils.Random() * 160F + 96F));
     }
 }