// Use this for initialization public TopWindow(MapModel mapModel) { Shader.WarmupAllShaders() ; this.mapModel = mapModel; this.animationPlayer = new Roga2dAnimationPlayer(); this.root = new Roga2dNode("Root"); this.AddChild(this.root); // animationPlayer this.player = spawnBattler("hose", 40, 30); this.root.AddChild(this.player); // Stage this.stage = new Stage(); this.stage.LocalPriority = 0.0f; this.root.AddChild(stage); this.mapModel.StepMoved += this.onStepMoved; this.stage.ScrollFinished += this.onScrollFinished; }
Ally spawnBattler(string name, float x, float y) { Ally battler = new Ally(name); battler.Sprite.LocalPriority = 0.1f; battler.LocalPixelPosition = new Vector2(x, y); this.battlers.Add(battler); return battler; }