|
@@ -101,6 +101,7 @@ public class PlayerController : MoveCharacter
|
|
|
[HideInInspector]
|
|
[HideInInspector]
|
|
|
public float cacheJumpTime; //即将落地时按下跳跃键不会跳跃,手感不好,缓存几帧,在这几帧内落地会立即跳跃;
|
|
public float cacheJumpTime; //即将落地时按下跳跃键不会跳跃,手感不好,缓存几帧,在这几帧内落地会立即跳跃;
|
|
|
public float totalCacheJumpTime = 0.1f;
|
|
public float totalCacheJumpTime = 0.1f;
|
|
|
|
|
+ public float platformVariance;
|
|
|
|
|
|
|
|
[Header("飞行属性")]
|
|
[Header("飞行属性")]
|
|
|
public float flySpeed = 5;
|
|
public float flySpeed = 5;
|
|
@@ -142,26 +143,9 @@ public class PlayerController : MoveCharacter
|
|
|
public float readyTipFxTime;
|
|
public float readyTipFxTime;
|
|
|
public int dienum;
|
|
public int dienum;
|
|
|
|
|
|
|
|
- //攻击力
|
|
|
|
|
- [Header("增加攻击力特效")]
|
|
|
|
|
- public GameObject attackEffect;
|
|
|
|
|
- [Header("攻击力献祭比例")]
|
|
|
|
|
- public float addRate;
|
|
|
|
|
- //泰山压顶
|
|
|
|
|
- [Header("泰山压顶")]
|
|
|
|
|
- public GameObject mountain;
|
|
|
|
|
- public Vector3 mountainOffset;
|
|
|
|
|
- public float largeX;
|
|
|
|
|
- //气功波
|
|
|
|
|
- public GameObject wavePowerObj;
|
|
|
|
|
- [Header("气功波伤害基数")] public int wavePowerDamage;
|
|
|
|
|
- //御剑术
|
|
|
|
|
- public GameObject flyingSwordsObj;
|
|
|
|
|
- //怨气弹
|
|
|
|
|
- public GameObject angryBulletObj;
|
|
|
|
|
- [Header("怨气弹数量基数")] public int angryBulletNum;
|
|
|
|
|
[Header("士兵复活点位")] [ShowInInspector] public List<StoneStatue> rebornSkills = new List<StoneStatue>();
|
|
[Header("士兵复活点位")] [ShowInInspector] public List<StoneStatue> rebornSkills = new List<StoneStatue>();
|
|
|
[Header("死亡士兵统计")] [ShowInInspector] public List<DeadDemonicInformation> deadDemonicList;
|
|
[Header("死亡士兵统计")] [ShowInInspector] public List<DeadDemonicInformation> deadDemonicList;
|
|
|
|
|
+
|
|
|
public override int regeneration
|
|
public override int regeneration
|
|
|
{
|
|
{
|
|
|
get { return GameManager.instance.regeneration; }
|
|
get { return GameManager.instance.regeneration; }
|
|
@@ -369,7 +353,6 @@ public class PlayerController : MoveCharacter
|
|
|
break;
|
|
break;
|
|
|
}
|
|
}
|
|
|
demonicDic = new Dictionary<int, List<Demonic>>();
|
|
demonicDic = new Dictionary<int, List<Demonic>>();
|
|
|
- deadDemonicList = new List<DeadDemonicInformation>();
|
|
|
|
|
for (int i = 0; i < 5; i++)
|
|
for (int i = 0; i < 5; i++)
|
|
|
{
|
|
{
|
|
|
demonicDic.Add(i, new List<Demonic>());
|
|
demonicDic.Add(i, new List<Demonic>());
|
|
@@ -733,10 +716,19 @@ public class PlayerController : MoveCharacter
|
|
|
if (leftDir.y < -0.5)
|
|
if (leftDir.y < -0.5)
|
|
|
{
|
|
{
|
|
|
Platform platform = foot.trigGroundList[0].GetComponent<Platform>();
|
|
Platform platform = foot.trigGroundList[0].GetComponent<Platform>();
|
|
|
|
|
+ float plfy = platform.transform.position.y;
|
|
|
if (platform != null && platform.canDown)
|
|
if (platform != null && platform.canDown)
|
|
|
{
|
|
{
|
|
|
foot.trigGroundList.Remove(platform.gameObject);
|
|
foot.trigGroundList.Remove(platform.gameObject);
|
|
|
}
|
|
}
|
|
|
|
|
+ for (int i = foot.trigGroundList.Count - 1; i>=0 ;i--)
|
|
|
|
|
+ {
|
|
|
|
|
+ GameObject platformObj = foot.trigGroundList[i].gameObject;
|
|
|
|
|
+ if(Mathf.Abs(platformObj.transform.position.y - plfy) <= platformVariance)
|
|
|
|
|
+ {
|
|
|
|
|
+ foot.trigGroundList.Remove(platformObj);
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
if (canFly)
|
|
if (canFly)
|
|
|
{
|
|
{
|
|
@@ -1201,7 +1193,6 @@ public class PlayerController : MoveCharacter
|
|
|
transform.position = new Vector3(towerPos.x + refreshPos.x , towerPos.y+refreshPos.y, 0);
|
|
transform.position = new Vector3(towerPos.x + refreshPos.x , towerPos.y+refreshPos.y, 0);
|
|
|
nextSummonNum = 1;
|
|
nextSummonNum = 1;
|
|
|
GameUI.instance.summonNum.text = nextSummonNum.ToString();
|
|
GameUI.instance.summonNum.text = nextSummonNum.ToString();
|
|
|
- deadDemonicList = new List<DeadDemonicInformation>();
|
|
|
|
|
switch (playerId)
|
|
switch (playerId)
|
|
|
{
|
|
{
|
|
|
case 0:
|
|
case 0:
|
|
@@ -1706,7 +1697,6 @@ public class PlayerController : MoveCharacter
|
|
|
return;
|
|
return;
|
|
|
}
|
|
}
|
|
|
demonicDic[demonic.id].Remove(demonic);
|
|
demonicDic[demonic.id].Remove(demonic);
|
|
|
- deadDemonicList.Add(new DeadDemonicInformation(demonic.id));
|
|
|
|
|
if (demonic.id <= 2)
|
|
if (demonic.id <= 2)
|
|
|
{
|
|
{
|
|
|
demonicNums[demonic.id].text = demonicDic[demonic.id].Count.ToString();
|
|
demonicNums[demonic.id].text = demonicDic[demonic.id].Count.ToString();
|