Esempio n. 1
0
 public cPickupInfo(PickupType pickup_type, cBaseRenderer renderer, Vector2f hit_rect_size, PickupEffectFunction effect)
 {
     this.pickupType  = pickup_type;
     this.renderer    = renderer;
     this.hitRectSize = hit_rect_size;
     this.effect      = effect;
 }
Esempio n. 2
0
 public cPickupInfo()
 {
     this.pickupType  = PickupType.UNKNOWN;
     this.renderer    = null;
     this.hitRectSize = new Vector2f(0, 0);
     this.effect      = null;
 }
Esempio n. 3
0
        private void init(Vector2f pos, Vector2f emit_direction)
        {
            this.pickedUp = pulling = false;
            this.heading  = emit_direction;

            this.renderer = pickup.Renderer.DeepCopy();

            this.Bounds = new AABB();
            this.Bounds.SetDims(this.pickup.HitRectSize);
            this.Bounds.SetPosByCenter(pos);
            this.HitCollisionRect = Bounds.ShallowCopy();

            this.MaxSpeed = EMIT_SPEED * 2; //*2
            this.mass     = 100.0f;

            this.velocity.X = this.heading.X * EMIT_SPEED;
            this.velocity.Y = this.heading.Y * EMIT_SPEED;
            orientation     = AppMath.GetAngleOfVector(heading);
        }