PageSourceSearch

https://www.soft-kitty.com/assets/js/057193d4.7254dc75.js

js soft-kitty.com collected 2026-10-04 10:04:53 UTC 8,539 bytes, 1 lines download raw bytes

1"use strict";(globalThis.webpackChunksoft_kitty_docs=globalThis.webpackChunksoft_kitty_docs||[]).push([[8262],{1675(a,e,n){n.r(e),n.d(e,{assets:()=>c,contentTitle:()=>s,default:()=>d,frontMatter:()=>l,metadata:()=>t,toc:()=>o});const t=JSON.parse('{"id":"master-map-navigation/callbacks","title":"Callbacks","description":"---","source":"@site/docs/master-map-navigation/callbacks.md","sourceDirName":"master-map-navigation","slug":"/master-map-navigation/callbacks","permalink":"/docs/master-map-navigation/callbacks","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{"title":"Callbacks"},"sidebar":"docs","previous":{"title":"Navigation Path","permalink":"/docs/master-map-navigation/navigation"},"next":{"title":"MapManager","permalink":"/docs/master-map-navigation/api/map-manager"}}');var i=n(4848),r=n(8453);const l={title:"Callbacks"},s=void 0,c={},o=[{value:"MapPointStateChangeCallback",id:"mappointstatechangecallback",level:4},{value:"MapPointCreateCallback",id:"mappointcreatecallback",level:4},{value:"MapPointRemoveCallback",id:"mappointremovecallback",level:4},{value:"MapPointDataUpdateCallback",id:"mappointdataupdatecallback",level:4},{value:"NavigationPathCallback",id:"navigationpathcallback",level:4},{value:"MapIconClickCallback",id:"mapiconclickcallback",level:4},{value:"MapLayerChangeCallback",id:"maplayerchangecallback",level:4},{value:"MarkerOutLimitCallback",id:"markeroutlimitcallback",level:4}];function p(a){const e={a:"a",code:"code",em:"em",h4:"h4",hr:"hr",p:"p",pre:"pre",strong:"strong",...(0,r.R)(),...a.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(e.hr,{}),"\n",(0,i.jsxs)(e.p,{children:["All callbacks in the system are managed by the ",(0,i.jsx)(e.a,{href:"/docs/master-map-navigation/api/map-manager",children:"MapManager"}),".cs script. Below is the list of available callbacks and their usage, including script examples for each."]}),"\n",(0,i.jsx)(e.hr,{}),"\n",(0,i.jsx)(e.h4,{id:"mappointstatechangecallback",children:"MapPointStateChangeCallback"}),"\n",(0,i.jsxs)(e.p,{children:[(0,i.jsx)(e.strong,{children:"Signature"}),": ",(0,i.jsx)(e.code,{children:"MapPointStateChange(Transform _key, int _state)"}),"\r\n",(0,i.jsx)(e.strong,{children:"Trigger"}),": When the state variable of a ",(0,i.jsx)(e.a,{href:"/docs/master-map-navigation/api/map-point",children:"MapPoint"})," changes."]}),"\n",(0,i.jsxs)(e.p,{children:[(0,i.jsx)(e.em,{children:"Usage Example"}),":"]}),"\n",(0,i.jsx)(e.pre,{children:(0,i.jsx)(e.code,{className:"language-csharp",children:"MapManeger.MapPointStateChangeCallback += OnMapStateChange;\r\npublic void OnMapStateChange(Transform _key, int _state){}\n"})}),"\n",(0,i.jsx)(e.hr,{}),"\n",(0,i.jsx)(e.h4,{id:"mappointcreatecallback",children:"MapPointCreateCallback"}),"\n",(0,i.jsxs)(e.p,{children:[(0,i.jsx)(e.strong,{children:"Signature"}),": ",(0,i.jsx)(e.code,{children:"MapPointCreate(Transform _key, MapPointData _data, int _state)"}),"\r\n",(0,i.jsx)(e.strong,{children:"Trigger"}),": When a ",(0,i.jsx)(e.a,{href:"/docs/master-map-navigation/api/map-point",children:"MapPoint"})," is added to the map system."]}),"\n",(0,i.jsxs)(e.p,{children:[(0,i.jsx)(e.em,{children:"Usage Example"}),":"]}),"\n",(0,i.jsx)(e.pre,{children:(0,i.jsx)(e.code,{className:"language-csharp",children:"MapManeger.MapPointCreateCallback += OnMapPointCreate;\r\npublic void OnMapPointCreate(Transform _key, MapPointData _data, int _state){}\n"})}),"\n",(0,i.jsx)(e.hr,{}),"\n",(0,i.jsx)(e.h4,{id:"mappointremovecallback",children:"MapPointRemoveCallback"}),"\n",(0,i.jsxs)(e.p,{children:[(0,i.jsx)(e.strong,{children:"Signature"}),": ",(0,i.jsx)(e.code,{children:"MapPointRemove(Transform _key)"}),"\r\n",(0,i.jsx)(e.strong,{children:"Trigger"}),": When a ",(0,i.jsx)(e.a,{href:"/docs/master-map-navigation/api/map-point",children:"MapPoint"})," is removed from the map system."]}),"\n",(0,i.jsxs)(e.p,{children:[(0,i.jsx)(e.em,{children:"Usage Example"}),":"]}),"\n",(0,i.jsx)(e.pre,{children:(0,i.jsx)(e.code,{className:"language-csharp",children:"MapManeger.MapPointRemoveCallback+= OnMapPointRemove;\r\npublic void OnMapPointRemove (Transform _key){}\n"})}),"\n",(0,i.jsx)(e.hr,{}),"\n",(0,i.jsx)(e.h4,{id:"mappointdataupdatecallback",children:"MapPointDataUpdateCallback"}),"\n",(0,i.jsxs)(e.p,{children:[(0,i.jsx)(e.strong,{children:"Signature"}),": ",(0,i.jsx)(e.code,{children:"MapPointDataUpdate(Transform _key, MapPointData _data)"}),"\r\n",(0,i.jsx)(e.strong,{children:"Trigger"}),": When the data of a ",(0,i.jsx)(e.a,{href:"/docs/master-map-navigation/api/map-point",children:"MapPoint"})," is updated."]}),"\n",(0,i.jsxs)(e.p,{children:[(0,i.jsx)(e.em,{children:"Usage Example"}),":"]}),"\n",(0,i.jsx)(e.pre,{children:(0,i.jsx)(e.code,{className:"language-csharp",children:"MapManeger. MapPointDataUpdateCallback += OnMapPointDataUpdateCallback;\r\npublic void OnMapPointDataUpdateCallback (Transform _key, MapPointData _data){}\n"})}),"\n",(0,i.jsx)(e.hr,{}),"\n",(0,i.jsx)(e.h4,{id:"navigationpathcallback",children:"NavigationPathCallback"}),"\n",(0,i.jsxs)(e.p,{children:[(0,i.jsx)(e.strong,{children:"Signature"}),": ",(0,i.jsx)(e.code,{children:"NavigationPathUpdate(List<Vector3> _path,bool _updateAll)"}),"\r\n",(0,i.jsx)(e.strong,{children:"Trigger"}),": When a ",(0,i.jsx)(e.a,{href:"/docs/master-map-navigation/navigation",children:"navigation path"})," is created, removed, or updated."]}),"\n",(0,i.jsxs)(e.p,{children:[(0,i.jsx)(e.em,{children:"Usage Example"}),":"]}),"\n",(0,i.jsx)(e.pre,{children:(0,i.jsx)(e.code,{className:"language-csharp",children:"MapManeger. NavigationPathCallback += OnNavigationPathUpdate;\r\npublic void OnNavigationPathUpdate (List<Vector3> _path,bool _updateAll){}\n"})}),"\n",(0,i.jsxs)(e.p,{children:["When ",(0,i.jsx)(e.code,{children:"_updateAll"})," is false, means only the first and last position of the List has changed, you should pull the first and last value of the list to replace the current one. When the List is empty means the path has been removed."]}),"\n",(0,i.jsx)(e.hr,{}),"\n",(0,i.jsx)(e.h4,{id:"mapiconclickcallback",children:"MapIconClickCallback"}),"\n",(0,i.jsxs)(e.p,{children:[(0,i.jsx)(e.strong,{children:"Signature"}),": ",(0,i.jsx)(e.code,{children:"MapIconClick(MapPoint _point, int _button)"}),"\r\n",(0,i.jsx)(e.strong,{children:"Trigger"}),": When a player clicks on a ",(0,i.jsx)(e.code,{children:"map icon"}),"."]}),"\n",(0,i.jsxs)(e.p,{children:[(0,i.jsx)(e.em,{children:"Usage Example"}),":"]}),"\n",(0,i.jsx)(e.pre,{children:(0,i.jsx)(e.code,{className:"language-csharp",children:"MapManeger. MapIconClickCallback += OnMapIconClick;\r\npublic void OnMapIconClick (MapPoint _point, int _button){}\n"})}),"\n",(0,i.jsx)(e.hr,{}),"\n",(0,i.jsx)(e.h4,{id:"maplayerchangecallback",children:"MapLayerChangeCallback"}),"\n",(0,i.jsxs)(e.p,{children:[(0,i.jsx)(e.strong,{children:"Signature"}),": ",(0,i.jsx)(e.code,{children:"MapLayerChange(int _layer)"}),"\r\n",(0,i.jsx)(e.strong,{children:"Trigger"}),": When the player enters a different map layer."]}
1),"\n",(0,i.jsxs)(e.p,{children:[(0,i.jsx)(e.em,{children:"Usage Example"}),":"]}),"\n",(0,i.jsx)(e.pre,{children:(0,i.jsx)(e.code,{className:"language-csharp",children:"MapManeger. MapLayerChangeCallback+= OnMapLayerChange;\r\npublic void OnMapLayerChange (int _layer){}\n"})}),"\n",(0,i.jsx)(e.hr,{}),"\n",(0,i.jsx)(e.h4,{id:"markeroutlimitcallback",children:"MarkerOutLimitCallback"}),"\n",(0,i.jsxs)(e.p,{children:[(0,i.jsx)(e.strong,{children:"Signature"}),": ",(0,i.jsx)(e.code,{children:"MarkerOutLimit(Vector3 _worldPos)"}),"\r\n",(0,i.jsx)(e.strong,{children:"Trigger"}),": When the player try to place more marker than the maximum allowed number."]}),"\n",(0,i.jsxs)(e.p,{children:[(0,i.jsx)(e.em,{children:"Usage Example"}),":"]}),"\n",(0,i.jsx)(e.pre,{children:(0,i.jsx)(e.code,{className:"language-csharp",children:"MapManeger.MarkerOutLimitCallback+= OnMarkerOutLimit;\r\npublic void OnMarkerOutLimit(Vector3 _worldPos) { }\n"})}),"\n",(0,i.jsx)(e.hr,{})]})}function d(a={}){const{wrapper:e}={...(0,r.R)(),...a.components};return e?(0,i.jsx)(e,{...a,children:(0,i.jsx)(p,{...a})}):p(a)}},8453(a,e,n){n.d(e,{R:()=>l,x:()=>s});var t=n(6540);const i={},r=t.createContext(i);function l(a){const e=t.useContext(r);return t.useMemo(function(){return"function"==typeof a?a(e):{...e,...a}},[e,a])}function s(a){let e;return e=a.disableParentContext?"function"==typeof a.components?a.components(i):a.components||i:l(a.components),t.createElement(r.Provider,{value:e},a.children)}}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.