Ejemplo n.º 1
0
        public override void Update( Hero hero )
        {
            // TODO: Actually make this based on movement-speed
              float moveLength = Time.deltaTime;

              if( hero.PlanarDistance( target ) > moveLength ) {
            hero.MoveDirection( ( target - hero.PlanarPosition ).normalized );
              } else {
            hero.SetPosition( target );
            hero.StopMoving();
            hero.state = new Idle();
              }
        }