|
|
@@ -114,44 +114,47 @@ public class MoveCharacter : Character
|
|
|
curFallSpeed = normalFallSpeed;
|
|
|
}
|
|
|
|
|
|
- //0:漂浮 1:正常 2:灵魂不稳定
|
|
|
+ //0:漂浮 1:正常 2:无敌
|
|
|
public void ChangeMat(int state)
|
|
|
{
|
|
|
- if(outline1Mats.Length == 0)
|
|
|
+
|
|
|
+ if (outline1Mats.Length == 0)
|
|
|
{
|
|
|
- Transform particleSystem = bodyTrans.GetChild(1).GetChild(0);
|
|
|
- if (particleSystem == null ||
|
|
|
- ( particleSystem != null && particleSystem.name != "Particle System"))
|
|
|
- {
|
|
|
- return;
|
|
|
- }
|
|
|
- ParticleSystem.MainModule mainModule;
|
|
|
- switch (state)
|
|
|
- {
|
|
|
- case 0:
|
|
|
- break;
|
|
|
- case 1:
|
|
|
- print(particleSystem.name);
|
|
|
- mainModule =
|
|
|
- particleSystem.GetChild(1).GetComponent<ParticleSystem>().main;
|
|
|
- mainModule.startColor = new ParticleSystem.MinMaxGradient(Color.white);
|
|
|
- mainModule =
|
|
|
- particleSystem.GetChild(2).GetComponent<ParticleSystem>().main;
|
|
|
- mainModule.startColor = new ParticleSystem.MinMaxGradient(Color.white);
|
|
|
- break;
|
|
|
- case 2:
|
|
|
- mainModule =
|
|
|
- particleSystem.GetChild(1).GetComponent<ParticleSystem>().main;
|
|
|
- mainModule.startColor = new ParticleSystem.MinMaxGradient(Color.yellow);
|
|
|
- mainModule =
|
|
|
- particleSystem.GetChild(2).GetComponent<ParticleSystem>().main;
|
|
|
- mainModule.startColor = new ParticleSystem.MinMaxGradient(Color.yellow);
|
|
|
- break;
|
|
|
- default:
|
|
|
- break;
|
|
|
- }
|
|
|
return;
|
|
|
+ //Transform particleSystem = bodyTrans.GetChild(1).GetChild(0);
|
|
|
+ //if (particleSystem == null ||
|
|
|
+ // (particleSystem != null && particleSystem.name != "Particle System"))
|
|
|
+ //{
|
|
|
+ // return;
|
|
|
+ //}
|
|
|
+ //ParticleSystem.MainModule mainModule;
|
|
|
+ //switch (state)
|
|
|
+ //{
|
|
|
+ // case 0:
|
|
|
+ // break;
|
|
|
+ // case 1:
|
|
|
+ // //print(particleSystem.name);
|
|
|
+ // //mainModule =
|
|
|
+ // // particleSystem.GetChild(1).GetComponent<ParticleSystem>().main;
|
|
|
+ // //mainModule.startColor = new ParticleSystem.MinMaxGradient(Color.white);
|
|
|
+ // //mainModule =
|
|
|
+ // // particleSystem.GetChild(2).GetComponent<ParticleSystem>().main;
|
|
|
+ // //mainModule.startColor = new ParticleSystem.MinMaxGradient(Color.white);
|
|
|
+ // break;
|
|
|
+ // case 2:
|
|
|
+ // //mainModule =
|
|
|
+ // // particleSystem.GetChild(1).GetComponent<ParticleSystem>().main;
|
|
|
+ // //mainModule.startColor = new ParticleSystem.MinMaxGradient(Color.yellow);
|
|
|
+ // //mainModule =
|
|
|
+ // // particleSystem.GetChild(2).GetComponent<ParticleSystem>().main;
|
|
|
+ // //mainModule.startColor = new ParticleSystem.MinMaxGradient(Color.yellow);
|
|
|
+ // break;
|
|
|
+ // default:
|
|
|
+ // break;
|
|
|
+ //}
|
|
|
+
|
|
|
}
|
|
|
+
|
|
|
if (spinee == null || mesh == null || mats == null)
|
|
|
{
|
|
|
spinee = transform.GetChild(0).GetChild(0).gameObject;
|
|
|
@@ -176,6 +179,10 @@ public class MoveCharacter : Character
|
|
|
{
|
|
|
if (!isTran)
|
|
|
{
|
|
|
+ if (isInvincible)
|
|
|
+ {
|
|
|
+ return;
|
|
|
+ }
|
|
|
if (canMove)
|
|
|
{
|
|
|
canMove = false;
|