summaryrefslogtreecommitdiff
path: root/SurvivalTest/Assets/Scripts/Props
diff options
context:
space:
mode:
Diffstat (limited to 'SurvivalTest/Assets/Scripts/Props')
-rw-r--r--SurvivalTest/Assets/Scripts/Props/PropBase.cs19
-rw-r--r--SurvivalTest/Assets/Scripts/Props/PropBase.cs.meta11
-rw-r--r--SurvivalTest/Assets/Scripts/Props/Prop_B2Phone.cs24
-rw-r--r--SurvivalTest/Assets/Scripts/Props/Prop_B2Phone.cs.meta11
-rw-r--r--SurvivalTest/Assets/Scripts/Props/Prop_NuclearBomb.cs14
-rw-r--r--SurvivalTest/Assets/Scripts/Props/Prop_NuclearBomb.cs.meta11
-rw-r--r--SurvivalTest/Assets/Scripts/Props/Prop_SpaceBeamer.cs21
-rw-r--r--SurvivalTest/Assets/Scripts/Props/Prop_SpaceBeamer.cs.meta11
8 files changed, 122 insertions, 0 deletions
diff --git a/SurvivalTest/Assets/Scripts/Props/PropBase.cs b/SurvivalTest/Assets/Scripts/Props/PropBase.cs
new file mode 100644
index 0000000..3976a3c
--- /dev/null
+++ b/SurvivalTest/Assets/Scripts/Props/PropBase.cs
@@ -0,0 +1,19 @@
+using System.Collections;
+using System.Collections.Generic;
+using UnityEngine;
+
+/// <summary>
+/// ÎïÆ·
+/// </summary>
+public abstract class PropBase
+{
+
+ public abstract string name { get; }
+
+ public abstract string iconPath { get; }
+
+ public abstract void OnUse(GameObject owner);
+
+ public virtual void Update() { }
+
+} \ No newline at end of file
diff --git a/SurvivalTest/Assets/Scripts/Props/PropBase.cs.meta b/SurvivalTest/Assets/Scripts/Props/PropBase.cs.meta
new file mode 100644
index 0000000..524ed68
--- /dev/null
+++ b/SurvivalTest/Assets/Scripts/Props/PropBase.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 2699d737bf98397438346e5642d38a2d
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/SurvivalTest/Assets/Scripts/Props/Prop_B2Phone.cs b/SurvivalTest/Assets/Scripts/Props/Prop_B2Phone.cs
new file mode 100644
index 0000000..40d2f87
--- /dev/null
+++ b/SurvivalTest/Assets/Scripts/Props/Prop_B2Phone.cs
@@ -0,0 +1,24 @@
+using System.Collections;
+using System.Collections.Generic;
+using UnityEngine;
+
+/// <summary>
+/// B2ºô½Ð»ú
+/// </summary>
+public class Prop_B2Phone : PropBase
+{
+ public override string name => "B2";
+
+ public override string iconPath => "art/ui/propicon/plane";
+
+ string prefabPath = "prefabs/weapon/b2";
+
+ public override void OnUse(GameObject owner)
+ {
+ TestB2 b2 = UnityEngine.Object.Instantiate(ResourceManager.Instance.Load<TestB2>(prefabPath));
+
+ Vector3 pos3D = owner.GetComponent<TopDownTransform>().GetProjectedPosition();
+ b2.Set(pos3D + new Vector3(-15, 0, 0), pos3D + new Vector3(15, 0, 0), 20f, 3f);
+ }
+
+} \ No newline at end of file
diff --git a/SurvivalTest/Assets/Scripts/Props/Prop_B2Phone.cs.meta b/SurvivalTest/Assets/Scripts/Props/Prop_B2Phone.cs.meta
new file mode 100644
index 0000000..f9e8411
--- /dev/null
+++ b/SurvivalTest/Assets/Scripts/Props/Prop_B2Phone.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: ecd5acd5480dcc841819ef81be7f8a09
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/SurvivalTest/Assets/Scripts/Props/Prop_NuclearBomb.cs b/SurvivalTest/Assets/Scripts/Props/Prop_NuclearBomb.cs
new file mode 100644
index 0000000..576e24e
--- /dev/null
+++ b/SurvivalTest/Assets/Scripts/Props/Prop_NuclearBomb.cs
@@ -0,0 +1,14 @@
+using System.Collections;
+using System.Collections.Generic;
+using UnityEngine;
+
+public class Prop_NuclearBomb : PropBase
+{
+ public override string name => "ºËµ¯ÃÜÂëÏä";
+
+ public override string iconPath => "art/ui/propicon/nuclear_bomb";
+
+ public override void OnUse(GameObject owner)
+ {
+ }
+} \ No newline at end of file
diff --git a/SurvivalTest/Assets/Scripts/Props/Prop_NuclearBomb.cs.meta b/SurvivalTest/Assets/Scripts/Props/Prop_NuclearBomb.cs.meta
new file mode 100644
index 0000000..2084041
--- /dev/null
+++ b/SurvivalTest/Assets/Scripts/Props/Prop_NuclearBomb.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 849a1a076e0ee154884d0ef95cb784cf
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/SurvivalTest/Assets/Scripts/Props/Prop_SpaceBeamer.cs b/SurvivalTest/Assets/Scripts/Props/Prop_SpaceBeamer.cs
new file mode 100644
index 0000000..e191d41
--- /dev/null
+++ b/SurvivalTest/Assets/Scripts/Props/Prop_SpaceBeamer.cs
@@ -0,0 +1,21 @@
+using System.Collections;
+using System.Collections.Generic;
+using UnityEngine;
+
+public class Prop_SpaceBeamer : PropBase
+{
+ public override string name => "ÎÀÐÇÉäÏß";
+
+ public override string iconPath => "art/ui/propicon/space_beamer";
+
+ string prefabPath = "prefabs/weapon/space_beam";
+
+ public override void OnUse(GameObject owner)
+ {
+ TestSpaceBeam beam = UnityEngine.Object.Instantiate<TestSpaceBeam>(ResourceManager.Instance.Load<TestSpaceBeam>(prefabPath));
+
+ Vector3 pos3D = owner.GetComponent<TopDownTransform>().position;
+ beam.Set(pos3D + new Vector3(3, 0, 0));
+ }
+
+} \ No newline at end of file
diff --git a/SurvivalTest/Assets/Scripts/Props/Prop_SpaceBeamer.cs.meta b/SurvivalTest/Assets/Scripts/Props/Prop_SpaceBeamer.cs.meta
new file mode 100644
index 0000000..925d582
--- /dev/null
+++ b/SurvivalTest/Assets/Scripts/Props/Prop_SpaceBeamer.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 33aa5992bcf34864fb2fa6254c0da57c
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant: