added GUI and pausing and finished death
This commit is contained in:
@ -16,6 +16,7 @@ public class BulletComponent : MonoBehaviour
|
||||
private float damageMagnitude = 1f;
|
||||
public float DamageMagnitude { get { return this.damageMagnitude; } }
|
||||
public float DamageRange { get { return damageRange; } }
|
||||
|
||||
// Start is called before the first frame update
|
||||
void Start()
|
||||
{
|
||||
|
@ -1,13 +1,14 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using static UnityEngine.UI.Image;
|
||||
|
||||
|
||||
public class PistolComponent : MonoBehaviour
|
||||
{
|
||||
[SerializeField]
|
||||
private Light targetingLight;
|
||||
|
||||
|
||||
private bool IsEnabled = false;
|
||||
|
||||
GameObject targetObject;
|
||||
@ -33,14 +34,13 @@ public class PistolComponent : MonoBehaviour
|
||||
// Start is called before the first frame update
|
||||
void Start()
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
|
||||
// Update is called once per frame
|
||||
void Update()
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
private float CalculateDrop(Vector3 origin,Vector3 destination,Vector3 force)
|
||||
{
|
||||
@ -78,6 +78,7 @@ public class PistolComponent : MonoBehaviour
|
||||
}
|
||||
public void Fire()
|
||||
{
|
||||
|
||||
GameObject projectile = Instantiate(projectilePrefab, this.bulletSpawnPoint);
|
||||
projectile.transform.localPosition = Vector3.zero;
|
||||
projectile.transform.localEulerAngles = Vector3.zero;
|
||||
@ -86,7 +87,7 @@ public class PistolComponent : MonoBehaviour
|
||||
pRigid.AddForce(pRigid.transform.up*this.firePower, ForceMode.Impulse);
|
||||
projectile.transform.parent = null;
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
public void Enable()
|
||||
|
Reference in New Issue
Block a user