SetScale() public method

public SetScale ( float scale ) : void
scale float
return void
Ejemplo n.º 1
0
        protected override void Initialize()
        {
            base.Initialize();

            //add a camera control for the state
            FpsCamera camera = new FpsCamera(new Vector3(0, 0, 0));
            this.SetCamera(camera);

            //add some entities to the state
            ModelEntity ent = new ModelEntity(0, 0, -20, "model.bin");
            this.AddEntity(ent);
            ent.SetScale(10f);

            ModelEntity ent2 = new ModelEntity(0, 0, 0, "couch1.obj");
            this.AddEntity(ent2);
            ent2.SetScale(0.2f);

            ModelEntity ent3 = new ModelEntity(-200, 0, 0, "model.bin");
            this.AddEntity(ent3);
            ent3.SetScale(100f);

            SpriteEntity sprite = new SpriteEntity(20, 0, -10, "tileset.png");
            this.AddEntity(sprite);
        }