vanilla-wow-addons – Blame information for rev 1
?pathlinks?
Rev | Author | Line No. | Line |
---|---|---|---|
1 | office | 1 | --piece nach links/rechts bewegen |
2 | --x = 1, wenn ohne mausbewegung stein verschoben wird |
||
3 | function Tetris_mous_OnPieceEnter (x) |
||
4 | if (Tetris["options"]["mous"] == 1) then |
||
5 | local name = nil; |
||
6 | if (x == 1) then |
||
7 | name = Tetris["game"]["mous"]; |
||
8 | else |
||
9 | name = this:GetName(); |
||
10 | --name speichern für eventueller neuer stein |
||
11 | Tetris["game"]["mous"] = name |
||
12 | end |
||
13 | --xy pos holen |
||
14 | local pos = Tetris_return_xy(name) |
||
15 | local x = pos["x"]; |
||
16 | --x pos des steins |
||
17 | local s_x = Tetris["game"]["s_pos_x"]; |
||
18 | if (x>s_x) then |
||
19 | local z = x-s_x |
||
20 | for i=1, z do |
||
21 | Tetris_GF_BF_r:Click(); |
||
22 | end |
||
23 | elseif (x<s_x) then |
||
24 | local z = s_x-x |
||
25 | for i=1, z do |
||
26 | Tetris_GF_BF_l:Click(); |
||
27 | end |
||
28 | end |
||
29 | end |
||
30 | end |
||
31 | |||
32 | --piece drehen, nach unten |
||
33 | function Tetris_mous_OnDownClick(arg1) |
||
34 | if (Tetris["options"]["mous"] == 1) then |
||
35 | --nach rechts drehen |
||
36 | if (arg1 == "RightButton") then |
||
37 | Tetris_GF_BF_u:Click(); |
||
38 | end |
||
39 | --nach unten |
||
40 | if (arg1 == "LeftButton") then |
||
41 | --starte den timer |
||
42 | Timex:AddNamedSchedule("Tetris_down_time", 0.5, nil, 1, Tetris_mouse_scroll_down) |
||
43 | end |
||
44 | end |
||
45 | end |
||
46 | |||
47 | --piece nach unten |
||
48 | function Tetris_mous_OnUpClick(arg1) |
||
49 | if (Tetris["options"]["mous"] == 1) then |
||
50 | --nach unten |
||
51 | if (arg1 == "LeftButton") then |
||
52 | --stoppe scroll down |
||
53 | if (Timex:NamedScheduleCheck("Tetris_down_time") == nil) then |
||
54 | Timex:DeleteNamedSchedule("Tetris_scroll_down"); |
||
55 | Tetris_timer_go (); |
||
56 | else |
||
57 | --instant drop |
||
58 | Timex:DeleteNamedSchedule("Tetris_down_time"); |
||
59 | Tetris_GF_BF_d:Click(); |
||
60 | end |
||
61 | end |
||
62 | end |
||
63 | end |
||
64 | |||
65 | --piece nach unten scrollen |
||
66 | function Tetris_mouse_scroll_down () |
||
67 | if (Timex:NamedScheduleCheck("Tetris_stone_timer") ~= nil) then |
||
68 | Timex:DeleteNamedSchedule("Tetris_stone_timer"); |
||
69 | end |
||
70 | Tetris_stone_move ("dd"); |
||
71 | Timex:AddNamedSchedule("Tetris_scroll_down", 0.1, nil, 1, Tetris_mouse_scroll_down) |
||
72 | end |
||
73 |