MOD: Enemy AI
MOD: Player Shooting MOD: Damage Player and Enemy
This commit is contained in:
@@ -5,14 +5,22 @@ using UnityEngine;
|
||||
[CreateAssetMenu(fileName = "Enemy", menuName = "Enemy/Enemy", order = 0)]
|
||||
public class Enemy : ScriptableObject
|
||||
{
|
||||
[HideInInspector]
|
||||
public float currentHealth = 0;
|
||||
|
||||
[SerializeField]
|
||||
private float health = 100;
|
||||
public float currentSpeed = 0;
|
||||
private float currentHealth = 100f;
|
||||
[SerializeField]
|
||||
private float currentSpeed = 2f;
|
||||
[SerializeField]
|
||||
private float damage = 20f;
|
||||
|
||||
private void Start() {
|
||||
currentHealth = health;
|
||||
public float getCurrentHealth(){
|
||||
return currentHealth;
|
||||
}
|
||||
|
||||
public float getCurrentSpeed(){
|
||||
return currentSpeed;
|
||||
}
|
||||
|
||||
public float getDamage(){
|
||||
return damage;
|
||||
}
|
||||
}
|
||||
|
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 7b9b2eb7ebb420a48a5c3c12569223c8
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@@ -0,0 +1,20 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
[CreateAssetMenu(fileName = "Player", menuName = "Player/Player", order = 0)]
|
||||
public class Player : ScriptableObject
|
||||
{
|
||||
[SerializeField]
|
||||
private float currentHealth = 100f;
|
||||
[SerializeField]
|
||||
private float currentSpeed = 5f;
|
||||
|
||||
public float getCurrentHealth(){
|
||||
return currentHealth;
|
||||
}
|
||||
|
||||
public float getCurrentSpeed(){
|
||||
return currentSpeed;
|
||||
}
|
||||
}
|
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 0f29fe535863e5b41bcdfc7b87840f04
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 02228afd5db5aef4eb69d87294994a8f
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@@ -0,0 +1,21 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
[CreateAssetMenu(fileName = "Weapon", menuName = "Weapon/Weapon", order = 0)]
|
||||
public class Weapon : ScriptableObject
|
||||
{
|
||||
[SerializeField]
|
||||
private float damage = 20f;
|
||||
[SerializeField]
|
||||
private float fireRate = 0;
|
||||
|
||||
public float getDamage(){
|
||||
return damage;
|
||||
}
|
||||
|
||||
public float getFireRate(){
|
||||
return fireRate;
|
||||
}
|
||||
|
||||
}
|
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c14c23aaaf8bbfd4d8320990568224eb
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
Reference in New Issue
Block a user