Commit 859fca4b authored by Jok's avatar Jok

no message

parent 1d62e240
......@@ -11,11 +11,10 @@ GameObject:
- component: {fileID: 1818459865233979302}
- component: {fileID: 546435855955265258}
- component: {fileID: 546435855955265261}
- component: {fileID: 4930897923621711948}
- component: {fileID: 3032704036229314206}
- component: {fileID: 546435855955265260}
m_Layer: 0
m_Name: EnemyRanged 1
m_Name: EnemyRanged
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
......@@ -97,19 +96,6 @@ CapsuleCollider:
m_Height: 0.6327838
m_Direction: 1
m_Center: {x: 0.04588693, y: 0, z: -2.6832936e-10}
--- !u!114 &4930897923621711948
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 546435855955265263}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: a7bdc197271574d459491b39874dc4ec, type: 3}
m_Name:
m_EditorClassIdentifier:
health: 50
--- !u!114 &3032704036229314206
MonoBehaviour:
m_ObjectHideFlags: 0
......@@ -136,6 +122,7 @@ MonoBehaviour:
player: {fileID: 0}
playerPosition: {x: 0, y: 0, z: 0}
thisTransform: {fileID: 0}
distanceToPlayer: 0
--- !u!54 &546435855955265260
Rigidbody:
m_ObjectHideFlags: 0
......
......@@ -5,7 +5,6 @@ using UnityEngine;
public class EnemyRanged : MonoBehaviour
{
[Header("Manually-Set Values")]
public float health;
public float attackRange;
[Space(5)]
public GameObject bulletPrefab;
......@@ -129,7 +128,8 @@ public class EnemyRanged : MonoBehaviour
Vector3 currentPlayerPosition = player.transform.position;
Color rand = new Color(Random.Range(0f, 1f), Random.Range(0f, 1f), Random.Range(0f, 1f));
ShootBullet();
Debug.DrawLine(this.transform.position, currentPlayerPosition, rand, 10f);
timer = 0;
......@@ -146,24 +146,25 @@ public class EnemyRanged : MonoBehaviour
Debug.Log(this.name + " is firing!");
}
#endregion
#endregion
#region health
#region health
void TakeDamage()
void TakeDamage(float amt)
{
// take damage!
}
void CheckHealth()
{
// Call this function every frame for conditionals based on remaining health, such as Die().
if (health <= 0) { Die(); }
//if (health <= 0) { Die(); }
}
void Die()
{
// Call this function when health hits 0 -
// add X "insanityRefillAmount" to player's Insanity and have a Y percent "chanceToDropAmmo" of dropping "ammoPrefab"
// Call this function when health hits 0 -
// add X "insanityRefillAmount" to player's Insanity and have a Y percent "chanceToDropAmmo" of dropping "ammoPrefab"
Destroy(gameObject);
//player.insanity += insanityRefill; //we don't have a specific name for the Player's insanity variable yet, "player.insanity" is filler. Once we do, add "insanityRefill" to it.
Debug.Log(this.name + " died!");
}
......
m_EditorVersion: 2018.3.5f1
m_EditorVersion: 2018.3.6f1
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment