add change mode

master
wlt233 2 years ago
parent c6782dbad5
commit 2951321e24

@ -20,7 +20,7 @@ public class Main : MonoBehaviour
private int style = -1;
public List<int> effectId;
private int effect = -1;
private int mode = -1;
private int mode = 0;
void Start()
{
@ -50,7 +50,10 @@ public class Main : MonoBehaviour
void Update()
{
;
if (Input.GetMouseButtonDown(2))
{
ChangeMode();
}
}
void LoadAb(string abPath)
@ -65,14 +68,29 @@ public class Main : MonoBehaviour
controller = charm.GetComponent<WeaponController>();
charm.AddComponent<MouseControlModel>();
styleId.Clear();
style = -1;
for (int i = 0; i < controller.weaponMaterialList.Length; i++)
{
styleId.Add(controller.weaponMaterialList[i].colorIndex);
}
effectId.Clear();
effect = -1;
for (int i = 0; i < controller.specialEffectList.Length; i++)
{
effectId.Add(controller.specialEffectList[i].id);
}
mode = 0;
}
void ChangeMode()
{
mode++;
controller.SetAnimeSpeed(.5f);
if (mode % 2 == 0)
controller.WeaponChangeOnly(WeaponMode.WeaponTypeA);
else
controller.WeaponChangeOnly(WeaponMode.WeaponTypeB);
}
}

Loading…
Cancel
Save