Files
Barrack-Unity/Assets/Scripts/Game/PlayerGun.cs
T

23 lines
486 B
C#

using UnityEngine;
public class PlayerGun : MonoBehaviour
{
public Player player;
private Animator animator;
private SpriteRenderer spriteRenderer;
// Start is called once before the first execution of Update after the MonoBehaviour is created
void Start()
{
spriteRenderer = GetComponent<SpriteRenderer>();
animator = GetComponent<Animator>();
}
public void AnimationFinished()
{
spriteRenderer.enabled = false;
}
}