Ejemplo n.º 1
0
 // Token: 0x06008BF1 RID: 35825 RVA: 0x0028DA80 File Offset: 0x0028BC80
 public void MovePath(List <int> path, Action onMoveEnd)
 {
     if (!BJLuaObjHelper.IsSkipLuaHotfix && this.TryInitHotFix("") && this.m_MovePathList ` 1Action_hotfix != null)
     {
         this.m_MovePathList ` 1Action_hotfix.call(new object[]
         {
             this,
             path,
             onMoveEnd
         });
         return;
     }
     BJLuaObjHelper.IsSkipLuaHotfix = false;
     this.m_movePath.Clear();
     foreach (int waypointId in path)
     {
         ClientWorldWaypoint waypoint = this.m_clientWorld.GetWaypoint(waypointId);
         if (waypoint != null)
         {
             this.m_movePath.Add(waypoint);
         }
     }
     if (this.m_movePath.Count > 0)
     {
         this.m_onMoveEnd = onMoveEnd;
         this.PlayAnimation("run", true);
         this.m_clientWorld.WorldCamera.StartFollow();
         this.m_clientWorld.WorldCamera.SetFollowPosition(this.m_position);
     }
     else if (onMoveEnd != null)
     {
         onMoveEnd();
     }
 }
Ejemplo n.º 2
0
        // Token: 0x06008BF0 RID: 35824 RVA: 0x0028D9CC File Offset: 0x0028BBCC
        public void Locate(ConfigDataWaypointInfo waypointInfo, int dir)
        {
            if (!BJLuaObjHelper.IsSkipLuaHotfix && this.TryInitHotFix("") && this.m_LocateConfigDataWaypointInfoInt32_hotfix != null)
            {
                this.m_LocateConfigDataWaypointInfoInt32_hotfix.call(new object[]
                {
                    this,
                    waypointInfo,
                    dir
                });
                return;
            }
            BJLuaObjHelper.IsSkipLuaHotfix = false;
            if (waypointInfo == null)
            {
                return;
            }
            this.m_locateWaypointInfo = waypointInfo;
            ClientWorldWaypoint waypoint = this.m_clientWorld.GetWaypoint(waypointInfo.ID);

            if (waypoint != null)
            {
                this.Locate(waypoint.Position, dir);
            }
        }
Ejemplo n.º 3
0
        // Token: 0x06008D21 RID: 36129 RVA: 0x002930A8 File Offset: 0x002912A8
        public bool GetWaypoint(int id, out ConfigDataWaypointInfo waypointInfo, out Vector2 position)
        {
            ClientWorldWaypoint waypoint = this.m_clientWorld.GetWaypoint(id);

            if (waypoint != null)
            {
                waypointInfo = waypoint.WaypointInfo;
                position     = waypoint.Position;
                return(true);
            }
            waypointInfo = null;
            position     = Vector2.zero;
            return(false);
        }
Ejemplo n.º 4
0
 // Token: 0x06008C6D RID: 35949 RVA: 0x0028FB78 File Offset: 0x0028DD78
 public override void Draw()
 {
     if (!BJLuaObjHelper.IsSkipLuaHotfix && this.TryInitHotFix("") && this.m_Draw_hotfix != null)
     {
         this.m_Draw_hotfix.call(new object[]
         {
             this
         });
         return;
     }
     BJLuaObjHelper.IsSkipLuaHotfix = false;
     foreach (int waypointId in this.m_waypointInfo.Waypoints_ID)
     {
         ClientWorldWaypoint waypoint = this.m_clientWorld.GetWaypoint(waypointId);
         if (waypoint != null)
         {
             this.DrawArrow(this.m_position, waypoint.m_position, Color.white);
         }
     }
 }
Ejemplo n.º 5
0
 // Token: 0x06008BEC RID: 35820 RVA: 0x0028D52C File Offset: 0x0028B72C
 public override void TickGraphic(float dt)
 {
     if (!BJLuaObjHelper.IsSkipLuaHotfix && this.TryInitHotFix("") && this.m_TickGraphicSingle_hotfix != null)
     {
         this.m_TickGraphicSingle_hotfix.call(new object[]
         {
             this,
             dt
         });
         return;
     }
     BJLuaObjHelper.IsSkipLuaHotfix = false;
     if (this.m_movePath.Count > 0)
     {
         ClientWorldWaypoint clientWorldWaypoint = this.m_movePath[0];
         int dir = this.m_direction;
         if (clientWorldWaypoint.Position.x > this.m_position.x)
         {
             dir = 1;
         }
         else if (clientWorldWaypoint.Position.x < this.m_position.x)
         {
             dir = -1;
         }
         Vector2 vector = Vector2.MoveTowards(this.m_position, clientWorldWaypoint.Position, dt * 5f);
         this.Locate(vector, dir);
         this.m_clientWorld.WorldCamera.SetFollowPosition(vector);
         if ((this.m_position - clientWorldWaypoint.Position).sqrMagnitude < 0.001f)
         {
             this.Locate(clientWorldWaypoint.Position, dir);
             this.m_movePath.RemoveAt(0);
             if (this.m_movePath.Count == 0)
             {
                 this.PlayAnimation("idle", true);
                 if (this.m_onMoveEnd != null)
                 {
                     this.m_onMoveEnd();
                     this.m_onMoveEnd = null;
                 }
             }
         }
     }
     if (this.m_teleportWaypoint != null)
     {
         if (this.m_teleportAppearCountdown > 0f)
         {
             this.m_teleportAppearCountdown -= dt;
             if (this.m_teleportAppearCountdown <= 0f)
             {
                 this.m_teleportAppearCountdown    = 0f;
                 this.m_teleportEndActionCountdown = 0.7f;
                 this.Locate(this.m_teleportWaypoint.Position, this.m_direction);
                 this.SetVisible(true);
                 Vector3 p = new Vector3(this.m_position.x, this.m_position.y, -0.01f);
                 this.PlayFx("FX/Common_ABS/CommonFX/common_Teleport_2end.prefab", p);
                 this.m_clientWorld.WorldCamera.StartFollow();
                 this.m_clientWorld.WorldCamera.SetFollowPosition(this.m_position);
             }
         }
         else if (this.m_teleportEndActionCountdown > 0f)
         {
             this.m_teleportEndActionCountdown -= dt;
             if (this.m_teleportEndActionCountdown <= 0f)
             {
                 this.m_teleportEndActionCountdown = 0f;
                 this.m_teleportWaypoint           = null;
                 if (this.m_onTeleportEnd != null)
                 {
                     this.m_onTeleportEnd();
                     this.m_onTeleportEnd = null;
                 }
             }
         }
     }
     if (this.m_graphic != null)
     {
         this.m_graphic.Tick(dt);
     }
 }
Ejemplo n.º 6
0
 // Token: 0x06008C8A RID: 35978 RVA: 0x00290BAC File Offset: 0x0028EDAC
 public LuaExportHelper(ClientWorldWaypoint owner)
 {
     this.m_owner = owner;
 }