summaryrefslogtreecommitdiff
path: root/Assets/ProFlares/DemoScripts/AddForceToTarget.cs
diff options
context:
space:
mode:
authorchai <chaifix@163.com>2021-04-25 19:13:28 +0800
committerchai <chaifix@163.com>2021-04-25 19:13:28 +0800
commit783a3c0dcfb80fa016953ff141e6de12e262525e (patch)
tree6c1873b309ef997b9e61af1eb2649b0c1d07f16b /Assets/ProFlares/DemoScripts/AddForceToTarget.cs
parent08b84b4f21e650a1c8694c592442d508abeb39f0 (diff)
-proflares
Diffstat (limited to 'Assets/ProFlares/DemoScripts/AddForceToTarget.cs')
-rw-r--r--Assets/ProFlares/DemoScripts/AddForceToTarget.cs27
1 files changed, 0 insertions, 27 deletions
diff --git a/Assets/ProFlares/DemoScripts/AddForceToTarget.cs b/Assets/ProFlares/DemoScripts/AddForceToTarget.cs
deleted file mode 100644
index 3179773..0000000
--- a/Assets/ProFlares/DemoScripts/AddForceToTarget.cs
+++ /dev/null
@@ -1,27 +0,0 @@
-/// ProFlares - v1.08 - Copyright 2014-2015 All rights reserved - ProFlares.com
-
-using UnityEngine;
-using System.Collections;
-namespace ProFlares {
-public class AddForceToTarget : MonoBehaviour {
- public Transform target;
- public float force;
-
- public ForceMode mode;
-
- void FixedUpdate () {
-
-
- float dist = (Vector3.Distance(transform.position,target.position)*0.01f);
-
-
- Vector3 dir = target.position-transform.position;
-#if UNITY_5_0
- GetComponent<Rigidbody>().AddForce(dir*(force*dist),mode);
-#else
- GetComponent<Rigidbody>().AddForce(dir*(force*dist),mode);
-#endif
-
- }
-}
-} \ No newline at end of file