Ejemplo n.º 1
0
 public Bow(AbstractPhysicalObject abstractPhysicalObject, World world) : base(abstractPhysicalObject, world)
 {
     base.bodyChunks      = new BodyChunk[1];
     base.bodyChunks[0]   = new BodyChunk(this, 0, new Vector2(0f, 0f), 5f, 0.07f);
     bodyChunkConnections = new BodyChunkConnection[0];
     base.airFriction     = 0.999f;
     base.gravity         = 0.9f;
     bounce                   = 0.4f;
     drawProgress             = 0.0f;
     surfaceFriction          = 0.4f;
     collisionLayer           = 2;
     base.waterFriction       = 0.98f;
     base.buoyancy            = 1.0f;
     spinning                 = false;
     base.firstChunk.loudness = 7f;
     soundLoop                = new ChunkDynamicSoundLoop(base.firstChunk);
 }
Ejemplo n.º 2
0
 public LargePiston(AbstractPhysicalObject abstractPhysicalObject) : base(abstractPhysicalObject)
 {
     bodyChunks           = new BodyChunk[1];
     bodyChunks[0]        = new BodyChunk(this, 0, new Vector2(0f, 0f), 30f, 14f);
     bodyChunkConnections = new BodyChunkConnection[0];
     airFriction          = 0.9f;
     gravity         = 0f;
     bounce          = 0f;
     surfaceFriction = 9.9f;
     collisionLayer  = 1;
     deathmode       = (abstractPhysicalObject as AbstractLargePiston).deathmode;
     deathtop        = (abstractPhysicalObject as AbstractLargePiston).deathtop;
     waterFriction   = 0.1f;
     buoyancy        = 0f;
     bodyChunks[0].collideWithObjects = true;
     bodyChunks[0].collideWithTerrain = false;
     bodyChunks[0].collideWithSlopes  = false;
     offset = UnityEngine.Random.Range(-1f, 1f);
 }
Ejemplo n.º 3
0
 public Quiver(AbstractPhysicalObject abstractPhysicalObject, World world) : base(abstractPhysicalObject, world)
 {
     base.bodyChunks      = new BodyChunk[1];
     base.bodyChunks[0]   = new BodyChunk(this, 0, new Vector2(0f, 0f), 2.5f, 0.05f);
     bodyChunkConnections = new BodyChunkConnection[0];
     base.airFriction     = 0.999f;
     base.gravity         = 0.9f;
     bounce                   = 0.4f;
     surfaceFriction          = 0.4f;
     collisionLayer           = 2;
     base.waterFriction       = 0.98f;
     base.buoyancy            = 1.0f;
     base.firstChunk.loudness = 7f;
     tailPos                  = base.firstChunk.pos;
     soundLoop                = new ChunkDynamicSoundLoop(base.firstChunk);
     base.armorMode           = ArmorMode.Free;
     base.armorSlot           = ArmorSlot.Accessory;
     strap = new Vector2[UnityEngine.Random.Range(4, UnityEngine.Random.Range(4, 10)), 6];
 }