Beispiel #1
0
 public void MoveActor (Actor actor)
 {
     ActorMovedArgs a = new ActorMovedArgs();
     a.actor = actor;
     OnActorMoved(a);
 }
Beispiel #2
0
 protected virtual void OnActorMoved(ActorMovedArgs e)
 {
     EventHandler<ActorMovedArgs> handler = ActorMoved;
     if (handler != null)
     {
         handler(this, e);
     }
 }
        void MoveActorSprite (object sender, ActorMovedArgs a)
        {
            if(go_actor.ContainsKey(a.actor) == false)
            {
                Debug.LogError("GO Key not found for UpdateActorSprite");
                return;
            }

            GameObject actor_go = go_actor[a.actor];
            actor_go.transform.position = new Vector3(a.actor.Tile.X, a.actor.Tile.Y);
        }