Beispiel #1
0
 private void init()
 {
     _transform          = this.gameObject.transform2();
     _transform.Position = new Vector2(100, 100);
     _velocity           = this.gameObject.getScript <VelocityComponent>();
     _map = Root.instance.RootObject.getScript <MapRenderer>();
 }
 private void init()
 {
     _velocity = this.gameObject.getScript <VelocityComponent>();
     addGrid(6, 4);
     fps      = 0.10f;
     size     = new Vector2(32, 64);
     material = Root.instance.resources.createMaterialFromTexture("content/textures/sprites_map_claudius.png");
     addAnimation("face-south", 0);
     addAnimation("face-west", 6);
     addAnimation("face-north", 12);
     addAnimation("face-east", 18);
     addAnimation("walk-south", 1, 2, 3, 4, 5);
     addAnimation("walk-west", 7, 8, 9, 10, 11);
     addAnimation("walk-north", 13, 14, 15, 16, 17);
     addAnimation("walk-east", 19, 20, 21, 22, 23);
     origin = new Vector2(0.5f, 1);
 }