2024-10-21 10:08:49 +08:00
|
|
|
|
using System.Collections;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using UnityEngine;
|
|
|
|
|
|
|
|
|
|
public class NoFire : MonoBehaviour
|
|
|
|
|
{
|
|
|
|
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
private GameObject MuzzlePos;
|
2024-12-27 17:43:27 +08:00
|
|
|
|
|
|
|
|
|
public bool isuse = false;
|
2024-10-21 10:08:49 +08:00
|
|
|
|
// Start is called before the first frame update
|
|
|
|
|
void Start()
|
|
|
|
|
{
|
|
|
|
|
Init();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Update is called once per frame
|
|
|
|
|
void Update()
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
void Init()
|
|
|
|
|
{
|
|
|
|
|
MuzzlePos = transform.Find("Muzzle").gameObject;
|
|
|
|
|
MuzzlePos.SetActive(false);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void StartFire()
|
|
|
|
|
{
|
|
|
|
|
MuzzlePos.SetActive(true);
|
2024-12-27 17:43:27 +08:00
|
|
|
|
isuse=true;
|
2024-10-21 10:08:49 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void StopFire()
|
|
|
|
|
{
|
|
|
|
|
MuzzlePos.SetActive(false);
|
2024-12-27 17:43:27 +08:00
|
|
|
|
isuse=false;
|
2024-10-21 10:08:49 +08:00
|
|
|
|
}
|
|
|
|
|
}
|