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