You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
52 lines
1.2 KiB
52 lines
1.2 KiB
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using UnityEngine;
|
|
using UnityEngine.UI;
|
|
|
|
public class UIFunction : MonoBehaviour
|
|
{
|
|
Main main;
|
|
void Start()
|
|
{
|
|
main = GameObject.Find("Main Camera").GetComponent<Main>();
|
|
}
|
|
|
|
public void chooseCharaModel(int i)
|
|
{
|
|
var charaName = main.charaAssetsNames.Keys.ToList()[i];
|
|
main.loadChara(charaName);
|
|
|
|
}
|
|
public void chooseWeaponLModel(int i)
|
|
{
|
|
if (i == 0) main.removeWeapon();
|
|
else
|
|
{
|
|
var weaponName = main.weaponAssetsNames.Keys.ToList()[i - 1];
|
|
main.loadWeaponL(weaponName);
|
|
}
|
|
}
|
|
|
|
public void chooseWeaponRModel(int i)
|
|
{
|
|
if (i == 0) main.removeWeapon();
|
|
else
|
|
{
|
|
var weaponName = main.weaponAssetsNames.Keys.ToList()[i - 1];
|
|
main.loadWeaponR(weaponName);
|
|
}
|
|
}
|
|
|
|
public void chooseAttachmentModel(int i)
|
|
{
|
|
if (i == 0) main.removeAttachment();
|
|
else
|
|
{
|
|
var attachmentName = main.attachmentAssetsNames.Keys.ToList()[i - 1];
|
|
main.loadAttachment(attachmentName);
|
|
}
|
|
}
|
|
}
|