Skip to content
Snippets Groups Projects
Commit 40030608 authored by Jason  Rivalino's avatar Jason Rivalino
Browse files

feat: add class for destroy

parent 66052932
Branches
2 merge requests!35feat: fix Game Data,!33merge fix/shotgunEnemy
......@@ -10,6 +10,7 @@ GameObject:
m_Component:
- component: {fileID: 8849857974068889211}
- component: {fileID: 5238843749234509961}
- component: {fileID: 8715392843248018793}
m_Layer: 0
m_Name: ShotgunLine
m_TagString: Untagged
......@@ -136,3 +137,25 @@ LineRenderer:
m_UseWorldSpace: 1
m_Loop: 0
m_ApplyActiveColorSpace: 1
--- !u!114 &8715392843248018793
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 9209258724073731464}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 175848193c5e7f148bff2f9d0dacbc3f, type: 3}
m_Name:
m_EditorClassIdentifier:
damagePerAttack: 0
timeBetweenAttack: 0
powerUp: 0
isUsed: 0
isPlayerOwner: 1
range: 10
bulletsPerShoot: 7
inaccuracyDistance: 2
shotgunLine: {fileID: 0}
faceLight: {fileID: 0}
......@@ -98,10 +98,6 @@ namespace CompleteProject
IEnumerator DestroyLine(GameObject shootLineObject) {
float timeDisplay = timeBetweenAttack* effectsDisplayTime;
if (enemyHealth.currentHealth <= 0) {
timeDisplay = 0;
}
while (timeDisplay > 0) {
timeDisplay-= Time.deltaTime;
yield return null;
......
using UnityEngine;
namespace CompleteProject
{
public class ShotgunLine : MonoBehaviour
{
// public GameObject shotgunLine;
void Awake()
{
// Create a layer mask for the Shootable layer.
Destroy(gameObject, 0.1f);
}
}
}
\ No newline at end of file
fileFormatVersion: 2
guid: 175848193c5e7f148bff2f9d0dacbc3f
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
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