示例#1
0
        // Constructor
        public Cloud(Stage stage, string label, string meshFile, int nClouds)
            : base(stage, label, meshFile)
        {
            random = new Random();

            //Add nClouds random cloud instances
            for (UInt32 i = 0; i < nClouds; i++)
            {
                UInt32 x = (UInt32)((128 + random.Next(256)) * stage.Spacing);
                UInt32 z = (UInt32)((128 + random.Next(256)) * stage.Spacing);

                addObject(
                    new Vector3(x, stage.surfaceHeight(x, z) + 15000, z),
                    new Vector3(0, 1, 0), 4.0f,
                    new Vector3(15, 4, 15));
            }
        }
示例#2
0
 public PathFindingNode(Stage theStage, Int32 x, Int32 z)
 {
     this.nodeColor = Color.Red.ToVector3();
     this.x = x;
     this.z = z;
     this.y = (Int32)theStage.surfaceHeight((float)x, (float)z);
     this.id = string.Format("{0}::{1}", x, z);
     adjacent = new LinkedList<PathFindingNode>();
 }