|
|
|
@ -11,13 +11,13 @@ public class Main : MonoBehaviour
|
|
|
|
|
private string abDir;
|
|
|
|
|
private List<string> abNameList = new List<string>();
|
|
|
|
|
private int idx = 0;
|
|
|
|
|
private int count;
|
|
|
|
|
|
|
|
|
|
private GameObject charm;
|
|
|
|
|
private WeaponController controller;
|
|
|
|
|
private AssetBundle bundle;
|
|
|
|
|
|
|
|
|
|
public List<int> styleId;
|
|
|
|
|
private int style = -1;
|
|
|
|
|
private int style = 0;
|
|
|
|
|
public List<int> effectId;
|
|
|
|
|
private int effect = -1;
|
|
|
|
|
private int mode = 0;
|
|
|
|
@ -42,8 +42,7 @@ public class Main : MonoBehaviour
|
|
|
|
|
}
|
|
|
|
|
t++;
|
|
|
|
|
}
|
|
|
|
|
count = abNameList.Count;
|
|
|
|
|
LoadAb(abDir + '\\' +abNameList[idx % count]);
|
|
|
|
|
LoadAb(abDir + '\\' +abNameList[idx % abNameList.Count]);
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -58,7 +57,7 @@ public class Main : MonoBehaviour
|
|
|
|
|
|
|
|
|
|
void LoadAb(string abPath)
|
|
|
|
|
{
|
|
|
|
|
var bundle = AssetBundle.LoadFromFile(abPath);
|
|
|
|
|
bundle = AssetBundle.LoadFromFile(abPath);
|
|
|
|
|
foreach (var name in bundle.GetAllAssetNames())
|
|
|
|
|
{
|
|
|
|
|
Debug.Log(name);
|
|
|
|
@ -68,13 +67,14 @@ public class Main : MonoBehaviour
|
|
|
|
|
controller = charm.GetComponent<WeaponController>();
|
|
|
|
|
charm.AddComponent<MouseControlModel>();
|
|
|
|
|
styleId.Clear();
|
|
|
|
|
style = -1;
|
|
|
|
|
style = 0;
|
|
|
|
|
for (int i = 0; i < controller.weaponMaterialList.Length; i++)
|
|
|
|
|
{
|
|
|
|
|
styleId.Add(controller.weaponMaterialList[i].colorIndex);
|
|
|
|
|
}
|
|
|
|
|
effectId.Clear();
|
|
|
|
|
effect = -1;
|
|
|
|
|
effect = 0;
|
|
|
|
|
effectId.Add(-1);
|
|
|
|
|
for (int i = 0; i < controller.specialEffectList.Length; i++)
|
|
|
|
|
{
|
|
|
|
|
effectId.Add(controller.specialEffectList[i].id);
|
|
|
|
@ -83,7 +83,7 @@ public class Main : MonoBehaviour
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void ChangeMode()
|
|
|
|
|
public void ChangeMode()
|
|
|
|
|
{
|
|
|
|
|
mode++;
|
|
|
|
|
controller.SetAnimeSpeed(.5f);
|
|
|
|
@ -93,4 +93,24 @@ public class Main : MonoBehaviour
|
|
|
|
|
controller.WeaponChangeOnly(WeaponMode.WeaponTypeB);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void ChangeSkin()
|
|
|
|
|
{
|
|
|
|
|
style++;
|
|
|
|
|
controller.ChangeWeaponStyle(styleId[style % styleId.Count]);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void ChangeEffect()
|
|
|
|
|
{
|
|
|
|
|
effect++;
|
|
|
|
|
controller.SetSpecialEffect(effectId[effect % effectId.Count]);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void NextAb()
|
|
|
|
|
{
|
|
|
|
|
idx++;
|
|
|
|
|
if (charm) Destroy(charm);
|
|
|
|
|
if (bundle) bundle.Unload(true);
|
|
|
|
|
Camera.main.fieldOfView = 50;
|
|
|
|
|
LoadAb(abDir + '\\' +abNameList[idx % abNameList.Count]);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|