-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSwipeAPI.txt
More file actions
32 lines (21 loc) · 1.31 KB
/
SwipeAPI.txt
File metadata and controls
32 lines (21 loc) · 1.31 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
API Documentation
(*for both scripts).
Inspector var-s
a. treshold - when swipe will automatically happen.
example:
Assume half is chosen, then:
if half of item is displased and user swipe is done, then item will automatically be swiped
towards the displacement direction.
else will return swipe will not happen, instead item will get back.
Note: behavior can be overriden by speedTreshold.
b. speedTreshold - when swipe average speed exceeds treshold, swipe happens, despite displacement treshold.
(i.e even if displacement is small, if swipe happend too fast, exceeding treshold, then swipe will happen)
c. changingTime - deltaTime for swipe, i.e affects how fast changing(swiping) element happens after finger removed.
d*. isBounded - if we can swipe last item, so that panel vanishes.
(only for horizontal swipe panel -- sometimes useful).
Note: these variables should e adjusted by developer, in order to get desired behavior of panel.
Methods
1. addKit(GameOject item) -- adds gameoject to panel to bottom.
2. clean(void) -- destroys ojects in panel.
3. Cleaner(void) -- can be used, in case of too many elements to remove elements partially. (up to developer).
4*. insert(GameObject object, int position) -- inserts gameojbect to specified position in panel. (--currently HorizontalPanel feature only--).