示例#1
0
 public Bl(Block b)
 {
     st = b.spillTime;
     cbi = b.currentBehaviorId;
     ct = b.currentTime;
     e1 = new Ed(b.edges[0]);
     e2 = new Ed(b.edges[1]);
     e3 = new Ed(b.edges[2]);
     e4 = new Ed(b.edges[3]);
     nb = b.nextBehavior;
 }
示例#2
0
文件: Block.cs 项目: kevincos/Vexed
 public Block(Block b)
 {
     unfoldedBlocks = new List<Block>();
     if (b.unfoldedBlocks != null)
     {
         foreach (Block oldUnfoldedBlock in b.unfoldedBlocks)
             unfoldedBlocks.Add(new Block(oldUnfoldedBlock));
     }
     id = b.id;
     staticObject = b.staticObject;
     nextBehavior = b.nextBehavior;
     depth = b.depth;
     length = b.length;
     height = b.height;
     area = b.area;
     wallType = b.wallType;
     scales = b.scales;
     color = b.color;
     currentTime = b.currentTime;
     currentBehaviorId = b.currentBehaviorId;
     if(b.currentBehavior != null)
         currentBehaviorId = b.currentBehavior.id;
     edges = new List<Edge>();
     behaviors = new List<Behavior>();
     foreach (Edge e in b.edges)
     {
         edges.Add(new Edge(e));
     }
     if (b.behaviors != null)
     {
         foreach (Behavior behavior in b.behaviors)
         {
             behaviors.Add(new Behavior(behavior));
         }
     }
 }
示例#3
0
文件: Doodad.cs 项目: kevincos/Vexed
 public bool CollisionFirstPass(Block b)
 {
     return (boundingBoxBottom > b.boundingBoxTop ||
                 boundingBoxTop < b.boundingBoxBottom ||
                 boundingBoxLeft > b.boundingBoxRight ||
                 boundingBoxRight < b.boundingBoxLeft);
 }