Exemple #1
0
        public override void Start()
        {
            ((Game)Game).WindowMinimumUpdateRate.SetMaxFrequency(60);

            var animComponent = Entity.GetOrCreate <AnimationComponent>();

            if (animComponent != null)
            {
                PlayAnimations(animComponent);
            }

            instancingMany = new InstancingUserArray()
            {
                ModelTransformUsage = ModelTransformUsage.PostMultiply
            };
            if (Entity.Get <InstancingComponent>() == null)
            {
                var instancingComponent = Entity.GetOrCreate <InstancingComponent>();
                instancingComponent.Type = instancingMany;
            }
            instanceWorldTransformations = new Matrix[InstanceCount];
        }
Exemple #2
0
 protected override IInstancing GetInstancingType()
 {
     instancingUserArray = new InstancingUserArray();
     return(instancingUserArray);
 }