add toolbar and function

master
wlt233 2 years ago
parent 2951321e24
commit 348838508b

@ -216,15 +216,15 @@ namespace Illusion
// RVA: 0x327C2BC Offset: 0x327C2BC VA: 0x327C2BC
public void SetSpecialEffect(int id)
{
if (id >= 1)
{
// if (id >= 1) // modify
//{
for (int i = 0; i < specialEffectList.Length; i++)
{
specialEffectList[i].effect.SetActive(false); // modify
if (specialEffectList[i].id == id)
specialEffectList[i].effect.SetActive(true);
}
}
//}
}
// RVA: 0x327C384 Offset: 0x327C384 VA: 0x327C384

@ -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]);
}
}

File diff suppressed because it is too large Load Diff

@ -0,0 +1,28 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Toolbar : MonoBehaviour
{
private CanvasGroup bar;
void Start()
{
bar = this.GetComponent<CanvasGroup>();
}
public void EnterUIShow()
{
bar.alpha = 1;
}
public void ExitUIHide()
{
bar.alpha = 0;
}
void Update()
{
}
}

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 72bc915e322253842b5077e9efbc84f4
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
Loading…
Cancel
Save