- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- 31
- 32
- 33
- 34
- 35
- 36
- 37
- 38
- 39
- 40
- 41
- 42
- 43
- 44
- 45
- 46
- 47
- 48
- 49
- 50
- 51
- 52
- 53
- 54
- 55
- 56
- 57
- 58
- 59
- 60
- 61
- 62
- 63
- 64
- 65
- 66
- 67
- 68
- 69
- 70
- 71
- 72
- 73
- 74
- 75
- 76
- 77
- 78
- 79
- 80
- 81
- 82
- 83
- 84
- 85
- 86
- 87
- 88
- 89
- 90
- 91
- 92
- 93
- 94
- 95
if ((Mathf.Abs(_mouseOverX) > 0.2f || Mathf.Abs(_mouseOverY) > 0.2f))
{
switch (selecetedItemIndex)
{
case -1 :
var a = Mathf.Atan2(_mouseOverX, _mouseOverY) * Mathf.Rad2Deg;
a += angle / 2.0f;
if (a < 0) a = a + 360.0f;
index = (int)(a / angle);
break;
case 0:
var a0 = Mathf.Atan2(_mouseOverX, _mouseOverY) * Mathf.Rad2Deg;
a0 += angle / 2.0f;
if (a0 < 0) a0 = a0 + 360.0f;
index = (int)(a0 / angle);
switch (index)
{
case 5 :
index = 7;
break;
case 6:
index = 7;
break;
case 4 :
index = -1;
break;
case 3:
index = 1;
break;
case 2:
index = 1;
break;
}
break;
case 1:
var a1 = Mathf.Atan2(_mouseOverX, _mouseOverY) * Mathf.Rad2Deg;
a1 += angle / 2.0f;
if (a1 < 0) a1 = a1 + 360.0f;
index = (int)(a1 / angle);
switch (index)
{
case 0 :
index = 0;
break;
case 7:
index = 0;
break;
case 6 :
index = -1;
break;
case 5:
index = -1;
break;
case 4:
index = 3;
break;
case 3:
index = 3;
break;
case 2:
index = 2;
break;
}
break;
case 2:
var a2 = Mathf.Atan2(_mouseOverX, _mouseOverY) * Mathf.Rad2Deg;
a2 += angle / 2.0f;
if (a2 < 0) a2 = a2 + 360.0f;
index = (int)(a2 / angle);
switch (index)
{
case 0: index = 1; break;
case 7: index = 1; break;
case 6: index = -1; break;
case 5: index = 3; break;
case 4: index = 3; break;
}
break;
case 3:
var a3 = Mathf.Atan2(_mouseOverX, _mouseOverY) * Mathf.Rad2Deg;
a3 += angle / 2.0f;
if (a3 < 0) a3 = a3 + 360.0f;
index = (int)(a3 / angle);
switch (index)
kegdan 18.09.2014 04:25 # 0
Кручу, кручу, кручу педали кручу,
С горы, с горы, с горы как птица лечу,
Спешу, спешу, спешу налегке
Навстречу радуге дуге!
someone 18.09.2014 05:52 # 0