local PathComponent = class("PathComponent") function PathComponent:initialize(entity) --路径, 格子 -- 在PathSystem.FindPath里被赋值 self.Path = {} self.Path2 = {} -- 路径,格子-- 在PathSystem.FindPath里被赋值 。目前使用地方是表现层的寻路路线特效 self.TargetPos = nil self.CurFindPathCount = 0 -- 共用 self.CurPathPosIndex = 1 end function PathComponent:IsArrived() return #self.Path <= 0 or self.CurPathPosIndex > #self.Path end return PathComponent