_xiaofang/xiaofang/Assets/Script/XFS.cs
2024-12-16 20:29:28 +08:00

45 lines
1001 B
C#

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class XFS : MonoBehaviour
{
// Start is called before the first frame update
public Button ConnectGun;
public Button ConnectFa;
public Button OpenFa;
public GameObject Gun;
public Transform Hand;
void Start()
{
ConnectGun.onClick.AddListener(connectGun);
ConnectFa.onClick.AddListener(connectFa);
OpenFa.onClick.AddListener(openFa);
}
void connectGun()
{
GameObject ob = Instantiate(Gun);
ob.transform.SetParent(Hand);
ob.transform.localRotation = new Quaternion(0, 180, 0, 0);
ob.transform.localPosition = new Vector3(0.000419999997f, 0.00138999999f, 0.000569999975f);
ob.transform.localScale = new Vector3(0.01f, 0.01f, 0.01f);
}
void connectFa()
{
}
void openFa()
{
}
// Update is called once per frame
void Update()
{
}
}