- 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
if(itemsCount <= 2)
{
if(iteration == 1)
{
dragItemPos = new Vector3(-20, -55, 0);
}else if(iteration == 2){
dragItemPos = new Vector3(145, 75, 0);
}
}else if(itemsCount == 3){
if(iteration == 1)
{
dragItemPos = new Vector3(60, -170, 0);
}else if(iteration == 2){
dragItemPos = new Vector3(245, -45, 0);
}else if(iteration == 3){
dragItemPos = new Vector3(20, 90, 0);
}
}else if(itemsCount == 4){
if(iteration == 1)
{
dragItemPos = new Vector3(60, -170, 0);
}else if(iteration == 2){
dragItemPos = new Vector3(245, -45, 0);
}else if(iteration == 3){
dragItemPos = new Vector3(-80, 2, 0);
}else if(iteration == 4){
dragItemPos = new Vector3(140, 160, 0);
}
}
else{
if(iteration == 1)
{
dragItemPos = new Vector3(60, -170, 0);
}else if(iteration == 2){
dragItemPos = new Vector3(245, -45, 0);
}else if(iteration == 3){
dragItemPos = new Vector3(-100, -45, 0);
}else if(iteration == 4){
dragItemPos = new Vector3(25, 95, 0);
}else if(iteration == 5){
dragItemPos = new Vector3(190, 180, 0);
}
}
Определяем позиции объекта по их количеству и по номеру итерации. Массивы? не не слышал.