コード例 #1
0
 public Scene(Camera2D camera, EventListener listener = null)
 {
     this.root = new Actor();
     this.root.SetScene(this);
     this.camera = camera;
     this.listener = listener;
 }
コード例 #2
0
 public void EventCalled(Events e, Actor actor)
 {
     if (e == Events.TouchUp)
     {
         if (actor.name == "start")
         {
             SetScreen(new IntroScreen());
             //SetScreen(new GameScreen());
         }
         if (actor.name == "highscores")
         {
            SetScreen(new HighscoreScreen());
         }
     }
 }
コード例 #3
0
 public void SetParent(Actor parent)
 {
     this.parent = parent;
 }
コード例 #4
0
 public void Add(string name, Actor actor)
 {
     actor.SetScene(GetScene());
     actor.name = name;
     actor.SetParent(this);
     actor.Init();
     actors.Add(name, actor);
 }
コード例 #5
0
 public void CallEvent(Events e, Actor actor)
 {
     if (listener != null)
         listener.EventCalled(e, actor);
 }
コード例 #6
0
 public void Remove(Actor actor)
 {
     root.Remove(actor.name);
 }
コード例 #7
0
 public void Add(string name, Actor actor)
 {
     root.Add(name, actor);
 }