|
@@ -32,8 +32,8 @@ namespace ET
|
|
|
var rand = new Random();
|
|
|
foreach (var id in units)
|
|
|
{
|
|
|
- float r = (float)Math.Sqrt(rand.Next(1225)) + 12;
|
|
|
- double ang = rand.Next(50) / 180.0f * Math.PI + Math.PI/2.0f + Math.PI;
|
|
|
+ float r = (float)Math.Sqrt(rand.Next(2304)) + 12;
|
|
|
+ double ang = rand.Next(40) / 180.0f * Math.PI + Math.PI/2.0f + Math.PI;
|
|
|
//Log.Debug($"rand unit r({r}), ang({ang})");
|
|
|
float x = centerpos.X + (float)(r * Math.Cos(ang));
|
|
|
float y = centerpos.Y - (float)(r * Math.Sin(ang));
|
|
@@ -47,7 +47,6 @@ namespace ET
|
|
|
Y = (int)y
|
|
|
}).Coroutine();
|
|
|
}
|
|
|
- //EventSystem.Instance.Publish(BattleMsgEvent.Static.Clone("'<font color=#fe3824>宝宝x</font>'进入了游戏,和大家一起守护家园!"));
|
|
|
break;
|
|
|
case (int)KeyCode.F2:
|
|
|
centerpos = GetCurBattleCenter();
|
|
@@ -56,8 +55,8 @@ namespace ET
|
|
|
for (int i = 0; i < 2; i++)
|
|
|
{
|
|
|
var id = units2[rand.Next(units2.Length)];
|
|
|
- float r = (float)Math.Sqrt(rand.Next(1225)) + 12;
|
|
|
- double ang = rand.Next(50) / 180.0f * Math.PI + Math.PI / 2.0f + Math.PI;
|
|
|
+ float r = (float)Math.Sqrt(rand.Next(2304)) + 12;
|
|
|
+ double ang = rand.Next(40) / 180.0f * Math.PI + Math.PI / 2.0f + Math.PI;
|
|
|
float x = centerpos.X + (float)(r * Math.Cos(ang));
|
|
|
float y = centerpos.Y - (float)(r * Math.Sin(ang));
|
|
|
|
|
@@ -69,7 +68,6 @@ namespace ET
|
|
|
Y = (int)y
|
|
|
}).Coroutine();
|
|
|
}
|
|
|
- //EventSystem.Instance.Publish(BattleMsgEvent.Static.Clone("'<font color=#fe2c55>宝宝x</font>'使用了'<font color=#fe3824>甜甜圈</font>',成功变形为'二级宝宝'"));
|
|
|
break;
|
|
|
case (int)KeyCode.F3:
|
|
|
centerpos = GetCurBattleCenter();
|
|
@@ -78,8 +76,8 @@ namespace ET
|
|
|
for (int i = 0; i < 1; i++)
|
|
|
{
|
|
|
var id = units3[rand.Next(units3.Length)];
|
|
|
- float r = (float)Math.Sqrt(rand.Next(1225)) + 12;
|
|
|
- double ang = rand.Next(50) / 180.0f * Math.PI + Math.PI / 2.0f + Math.PI;
|
|
|
+ float r = (float)Math.Sqrt(rand.Next(2304)) + 12;
|
|
|
+ double ang = rand.Next(40) / 180.0f * Math.PI + Math.PI / 2.0f + Math.PI;
|
|
|
float x = centerpos.X + (float)(r * Math.Cos(ang));
|
|
|
float y = centerpos.Y - (float)(r * Math.Sin(ang));
|
|
|
|
|
@@ -91,7 +89,6 @@ namespace ET
|
|
|
Y = (int)y
|
|
|
}).Coroutine();
|
|
|
}
|
|
|
- //EventSystem.Instance.Publish(BattleMsgEvent.Static.Clone("'<font color=#fe2c55>宝宝x</font>'使用了'<font color=#fe3824>甜甜圈</font>',成功变形为'三级宝宝'"));
|
|
|
break;
|
|
|
|
|
|
case (int)KeyCode.F4:
|