public override void updateObjectMapInformation() { floorData oldFloorData = gameModel.instance.getFloorDatas(InMapV3Pos); oldFloorData.UnregisterAntData(this, isFriendly); if (FollowMinePathSmellRecord) { oldFloorData.UnregisterFollowMinePathAntData(this); FollowMinePathSmellRecord = false; } if (randWalkSmellRecord) { oldFloorData.UnregisterRandWalkAntData(this); randWalkSmellRecord = false; } InMapV3Pos = gameModel.instance.charWorldToMapV3(transform); floorData newFloorData = gameModel.instance.getFloorDatas(InMapV3Pos); newFloorData.RegisterAntData(this, isFriendly); if (antMiningActivity == AntMiningActivityState.none) { newFloorData.RegisterRandWalkAntData(this); randWalkSmellRecord = true; } if (antMiningActivity == AntMiningActivityState.followTheMinePath) { newFloorData.RegisterFollowMinePathAntData(this); FollowMinePathSmellRecord = true; } }
//更新坐標 public virtual void updateObjectMapInformation() { //移除與註冊 floorData oldFloorData = gameModel.instance.getFloorDatas(InMapV3Pos); oldFloorData.UnregisterAntData(this, isFriendly); if (randWalkSmellRecord) { oldFloorData.UnregisterRandWalkAntData(this); randWalkSmellRecord = false; } InMapV3Pos = gameModel.instance.charWorldToMapV3(_transform); floorData newFloorData = gameModel.instance.getFloorDatas(InMapV3Pos); newFloorData.RegisterAntData(this, isFriendly); if (antActivity == AntActivityState.WalkingAround) { newFloorData.RegisterRandWalkAntData(this); randWalkSmellRecord = true; } }