|
@@ -523,7 +523,10 @@ public class PlayerController : MoveCharacter
|
|
|
{
|
|
{
|
|
|
return false;
|
|
return false;
|
|
|
}
|
|
}
|
|
|
- if (state != CharacterState.Conduct && nowConductButton != -1 && conductTime > totalCacheSummonTime)
|
|
|
|
|
|
|
+ if (state != CharacterState.Conduct
|
|
|
|
|
+ && nowConductButton != -1
|
|
|
|
|
+ && conductController.conductSkills[nowConductButton]!=ConductController.ConductSkills.Null
|
|
|
|
|
+ && conductTime > totalCacheSummonTime)
|
|
|
{
|
|
{
|
|
|
CheckTurn();
|
|
CheckTurn();
|
|
|
if (conductCanRelease[nowConductButton])
|
|
if (conductCanRelease[nowConductButton])
|
|
@@ -554,7 +557,7 @@ public class PlayerController : MoveCharacter
|
|
|
|
|
|
|
|
public bool CheckConduct()
|
|
public bool CheckConduct()
|
|
|
{
|
|
{
|
|
|
- if (isBtnEastUp || isBtnWestUp || isBtnSouthUp)
|
|
|
|
|
|
|
+ if (isBtnWestUp || isBtnSouthUp || isBtnEastUp)
|
|
|
{
|
|
{
|
|
|
if (isReadyConduct)
|
|
if (isReadyConduct)
|
|
|
{
|
|
{
|
|
@@ -636,96 +639,6 @@ public class PlayerController : MoveCharacter
|
|
|
return false;
|
|
return false;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- public void Conduct()
|
|
|
|
|
- {
|
|
|
|
|
- //switch (conductSkills[cacheConductId])
|
|
|
|
|
- //{
|
|
|
|
|
- // //¾ÞÈË
|
|
|
|
|
- // case ConductSkills.AddAttack:
|
|
|
|
|
- // List<Demonic> newGiants = new List<Demonic>();
|
|
|
|
|
- // foreach (Demonic d in demonicDic[cacheConductId])
|
|
|
|
|
- // {
|
|
|
|
|
- // if (!d.isDie)
|
|
|
|
|
- // {
|
|
|
|
|
- // newGiants.Add(d);
|
|
|
|
|
- // if (d.attackController.addAttackEffect == null)
|
|
|
|
|
- // {
|
|
|
|
|
- // d.attackController.addAttackEffect = Instantiate(attackEffect, d.bodyTrans.position, new Quaternion(0, 0, 0, 0), d.bodyTrans);
|
|
|
|
|
- // }
|
|
|
|
|
- // d.attackController.addAttackEffect.transform.GetChild(0).gameObject.SetActive(true);
|
|
|
|
|
- // }
|
|
|
|
|
- // }
|
|
|
|
|
- // foreach (Demonic d in newGiants)
|
|
|
|
|
- // {
|
|
|
|
|
- // int damage = d.attackController.curDamage;
|
|
|
|
|
- // d.attackController.curDamage += (int)(addRate * boostNum * damage);
|
|
|
|
|
- // }
|
|
|
|
|
- // break;
|
|
|
|
|
- // //Æø¹¦Ê¦
|
|
|
|
|
- // case ConductSkills.Mountain:
|
|
|
|
|
- // conductCanRelease[cacheConductId] = false;
|
|
|
|
|
- // GameObject curMountain = Instantiate(mountain, null);
|
|
|
|
|
- // Vector3 moffset = mountainOffset;
|
|
|
|
|
- // Vector3 sc = curMountain.transform.localScale;
|
|
|
|
|
- // sc.x = largeX * dienum;
|
|
|
|
|
- // curMountain.transform.localScale = sc;
|
|
|
|
|
- // if (bodyTrans.localScale.x < 0)
|
|
|
|
|
- // {
|
|
|
|
|
- // moffset.x = mountainOffset.x + sc.x / 2;
|
|
|
|
|
- // }
|
|
|
|
|
- // else
|
|
|
|
|
- // {
|
|
|
|
|
- // moffset.x = -mountainOffset.x - sc.x / 2;
|
|
|
|
|
- // }
|
|
|
|
|
- // Mountain MT = curMountain.GetComponent<Mountain>();
|
|
|
|
|
- // curMountain.transform.position = transform.position + moffset;
|
|
|
|
|
- // MT.pc = this;
|
|
|
|
|
- // MT.id = cacheConductId;
|
|
|
|
|
- // MT.demonicNum = boostNum;
|
|
|
|
|
- // break;
|
|
|
|
|
- // case ConductSkills.WavePower:
|
|
|
|
|
- // rb.constraints = RigidbodyConstraints.FreezeAll;
|
|
|
|
|
- // rb.useGravity = false;
|
|
|
|
|
- // conductCanRelease[cacheConductId] = false;
|
|
|
|
|
- // obj = Instantiate(wavePowerObj, transform);
|
|
|
|
|
- // obj.transform.position = transform.position + Vector3.up;
|
|
|
|
|
- // WavePowerSkill wps = obj.GetComponent<WavePowerSkill>();
|
|
|
|
|
- // wps.continueTime = wps.singleTime * dienum;
|
|
|
|
|
- // wps.longFX = (int)bodyTrans.localScale.x;
|
|
|
|
|
- // wps.damage = wavePowerDamage * boostNum;
|
|
|
|
|
- // wps.cacheID = cacheConductId;
|
|
|
|
|
- // wps.pc = this;
|
|
|
|
|
- // break;
|
|
|
|
|
- // case ConductSkills.SwordsControl:
|
|
|
|
|
- // conductCanRelease[cacheConductId] = false;
|
|
|
|
|
- // obj = Instantiate(flyingSwordsObj, transform);
|
|
|
|
|
- // obj.transform.position = transform.position + Vector3.up;
|
|
|
|
|
- // SwordsControl swordsControl = obj.GetComponentInChildren<SwordsControl>();
|
|
|
|
|
- // swordsControl.owner = this;
|
|
|
|
|
- // swordsControl.conductId = cacheConductId;
|
|
|
|
|
- // swordsControl.boostNum = boostNum;
|
|
|
|
|
- // break;
|
|
|
|
|
- // //¹¼ýÊÖ
|
|
|
|
|
- // case ConductSkills.AngryBullet:
|
|
|
|
|
- // conductCanRelease[cacheConductId] = false;
|
|
|
|
|
- // obj = Instantiate(angryBulletObj);
|
|
|
|
|
- // AngryBulletControl angryBulletControl = obj.GetComponent<AngryBulletControl>();
|
|
|
|
|
- // angryBulletControl.playerController = this;
|
|
|
|
|
- // angryBulletControl.cacheConductId = cacheConductId;
|
|
|
|
|
- // angryBulletControl.maxNum = boostNum * angryBulletNum;
|
|
|
|
|
- // break;
|
|
|
|
|
- // case ConductSkills.FlyingSwords:
|
|
|
|
|
- // obj = Instantiate(fanFlyingSwords);
|
|
|
|
|
- // FanFlyingSwords FFS = obj.GetComponent<FanFlyingSwords>();
|
|
|
|
|
- // FFS.owner = this;
|
|
|
|
|
- // FFS.angleRange = flyingSwordsAngleRange;
|
|
|
|
|
- // FFS.arrivalAngle = flyintSwordsArrivalAngle;
|
|
|
|
|
- // FFS.swordsNum = boostNum * flyingSwordsNum;
|
|
|
|
|
- // FFS.Biu();
|
|
|
|
|
- // break;
|
|
|
|
|
- //}
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
private int cannotConductfx;
|
|
private int cannotConductfx;
|
|
|
private void CannotConductFX(int id)
|
|
private void CannotConductFX(int id)
|
|
|
{
|
|
{
|
|
@@ -1555,11 +1468,9 @@ public class PlayerController : MoveCharacter
|
|
|
|
|
|
|
|
public void Summon(int id)
|
|
public void Summon(int id)
|
|
|
{
|
|
{
|
|
|
- GameObject prefab;
|
|
|
|
|
- prefab = demonicPrefabs[id];
|
|
|
|
|
ChangeState(CharacterState.Summon);
|
|
ChangeState(CharacterState.Summon);
|
|
|
summonTime = totalSummonTime;
|
|
summonTime = totalSummonTime;
|
|
|
- Demonic dem = prefab.GetComponent<Demonic>();
|
|
|
|
|
|
|
+ Demonic dem = demonicPrefabs[id].GetComponent<Demonic>();
|
|
|
float costMp = dem.costMp;
|
|
float costMp = dem.costMp;
|
|
|
for (int i = 0; i < 3; i++)
|
|
for (int i = 0; i < 3; i++)
|
|
|
{
|
|
{
|
|
@@ -1571,7 +1482,8 @@ public class PlayerController : MoveCharacter
|
|
|
}
|
|
}
|
|
|
mp -= costMp;
|
|
mp -= costMp;
|
|
|
uiMp.Show(mp, totalMp);
|
|
uiMp.Show(mp, totalMp);
|
|
|
- GameObject demonicObj = PoolManager.Instantiate(prefab);
|
|
|
|
|
|
|
+ CreateDemonic(demonicPrefabs[id]);
|
|
|
|
|
+ GameObject demonicObj = PoolManager.Instantiate(demonicPrefabs[id]);
|
|
|
Demonic demonic = demonicObj.GetComponent<Demonic>();
|
|
Demonic demonic = demonicObj.GetComponent<Demonic>();
|
|
|
slr.SoldierAddLevelBuff(demonic);
|
|
slr.SoldierAddLevelBuff(demonic);
|
|
|
GameManager gameManager = GameManager.instance;
|
|
GameManager gameManager = GameManager.instance;
|
|
@@ -1632,7 +1544,7 @@ public class PlayerController : MoveCharacter
|
|
|
}
|
|
}
|
|
|
demonic.player = this;
|
|
demonic.player = this;
|
|
|
demonic.Init();
|
|
demonic.Init();
|
|
|
- int order = prefab.GetComponent<Demonic>().baseSortingOrder + demonicDic[demonic.id].Count;
|
|
|
|
|
|
|
+ int order = demonicPrefabs[id].GetComponent<Demonic>().baseSortingOrder + demonicDic[demonic.id].Count;
|
|
|
demonic.SetSortingOrder(order);
|
|
demonic.SetSortingOrder(order);
|
|
|
|
|
|
|
|
int attackSummonId = nowAttackSummonID;
|
|
int attackSummonId = nowAttackSummonID;
|
|
@@ -1671,6 +1583,10 @@ public class PlayerController : MoveCharacter
|
|
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ public void CreateDemonic(GameObject prefab)
|
|
|
|
|
+ {
|
|
|
|
|
+
|
|
|
|
|
+ }
|
|
|
public void OnDemonicRecycle(Demonic demonic)
|
|
public void OnDemonicRecycle(Demonic demonic)
|
|
|
{
|
|
{
|
|
|
if (!demonicDic.ContainsKey(demonic.id))
|
|
if (!demonicDic.ContainsKey(demonic.id))
|