コード例 #1
0
 public SimpleTree GenerateSimpleTree(Random random)
 {
     SimpleTree tree = new SimpleTree(GraphicsDevice, Generator.GenerateTree(random));
     tree.TrunkTexture = TrunkTexture;
     tree.LeafTexture = LeafTexture;
     tree.TrunkEffect = TrunkEffect;
     tree.LeafEffect = LeafEffect;
     return tree;
 }
コード例 #2
0
        public SimpleTree GenerateSimpleTree(Random random)
        {
            SimpleTree tree = new SimpleTree(GraphicsDevice, Generator.GenerateTree(random));

            tree.TrunkTexture = TrunkTexture;
            tree.LeafTexture  = LeafTexture;
            tree.TrunkEffect  = TrunkEffect;
            tree.LeafEffect   = LeafEffect;
            return(tree);
        }
コード例 #3
0
 //        private TreeMesh trunk;
 //        private TreeLeafCloud leaves;
 //        private TreeAnimationState animationState;
 //        private Effect trunkEffect;
 //        private Effect leafEffect;
 //        private Texture2D trunkTexture;
 //        private Texture2D leafTexture;
 //        private Matrix[] bindingMatrices;
 //        private readonly BasicEffect boneEffect;
 public SunlitSimpleTree(SimpleTree tree)
     : this(tree.GraphicsDevice, tree.Skeleton)
 {
     AnimationState = tree.AnimationState;
     BindingMatrices = tree.BindingMatrices;
     Leaves = tree.Leaves;
     Trunk = tree.Trunk;
     LeafEffect = tree.LeafEffect;
     TrunkEffect = tree.TrunkEffect;
     LeafTexture = tree.LeafTexture;
     TrunkTexture = tree.TrunkTexture;
 }
コード例 #4
0
ファイル: Trees.cs プロジェクト: ravduke/Tank-Wars
 protected override void LoadContent()
 {
     TreeProfile profile = content.Load<TreeProfile>("Trees/Gardenwood");
        tree = profile.GenerateSimpleTree();
 }
コード例 #5
0
 public Tree(SimpleTree simpleTree, Matrix transformationMatrix)
 {
     this.simpleTree = simpleTree;
     this.transformationMatrix = transformationMatrix;
 }
コード例 #6
0
ファイル: LTree.cs プロジェクト: Imortilize/Psynergy-Engine
 public LTree(String name, SimpleTree tree) : base(name)
 {
     m_SimpleTree = tree;
 }
コード例 #7
0
ファイル: LTree.cs プロジェクト: Imortilize/Psynergy-Engine
 public LTree(SimpleTree tree) : base("")
 {
     m_SimpleTree = tree;
 }
コード例 #8
0
 void NewTree()
 {
     // Generates a new tree using the currently selected tree profile
     // We call TreeProfile.GenerateSimpleTree() which does three things for us:
     // 1. Generates a tree skeleton
     // 2. Creates a mesh for the branches
     // 3. Creates a particle cloud (TreeLeafCloud) for the leaves
     // The line mesh is just for testing and debugging
     tree = profiles[currentTree].GenerateSimpleTree();
     linemesh = new TreeLineMesh(GraphicsDevice, tree.Skeleton);
 }
コード例 #9
0
        public void UpdateTree()
        {
            if (!Initialized)
                return;

            tree = CurrentProfile.GenerateSimpleTree(new Random(seed));

            if (TreeUpdated != null)
                TreeUpdated(this, EventArgs.Empty);
        }