diff options
author | chai <chaifix@163.com> | 2021-01-27 16:30:19 +0800 |
---|---|---|
committer | chai <chaifix@163.com> | 2021-01-27 16:30:19 +0800 |
commit | 6ee18886c8af3858de5e97599b23086823d9f320 (patch) | |
tree | aed86a8c4887586d976410ecd3d14789b2ee3583 /Client/Assets/Behavior Designer/Runtime/Basic Tasks/Light/GetShadowSoftness.cs | |
parent | 97da432c35b8c7aaf9dd2c39e2aa4b1f55f36065 (diff) |
*更新Behaviour Designer版本,在最下版本有BUG
Diffstat (limited to 'Client/Assets/Behavior Designer/Runtime/Basic Tasks/Light/GetShadowSoftness.cs')
-rw-r--r-- | Client/Assets/Behavior Designer/Runtime/Basic Tasks/Light/GetShadowSoftness.cs | 47 |
1 files changed, 0 insertions, 47 deletions
diff --git a/Client/Assets/Behavior Designer/Runtime/Basic Tasks/Light/GetShadowSoftness.cs b/Client/Assets/Behavior Designer/Runtime/Basic Tasks/Light/GetShadowSoftness.cs deleted file mode 100644 index be58b1c9..00000000 --- a/Client/Assets/Behavior Designer/Runtime/Basic Tasks/Light/GetShadowSoftness.cs +++ /dev/null @@ -1,47 +0,0 @@ -#if UNITY_4_6 || UNITY_4_7
-using UnityEngine;
-
-namespace BehaviorDesigner.Runtime.Tasks.Basic.UnityLight
-{
- [TaskCategory("Basic/Light")]
- [TaskDescription("Stores the color of the light.")]
- public class GetShadowSoftness : Action
- {
- [Tooltip("The GameObject that the task operates on. If null the task GameObject is used.")]
- public SharedGameObject targetGameObject;
- [RequiredField]
- [Tooltip("The color to store")]
- public SharedFloat storeValue;
-
- // cache the light component
- private Light light;
- private GameObject prevGameObject;
-
- public override void OnStart()
- {
- var currentGameObject = GetDefaultGameObject(targetGameObject.Value);
- if (currentGameObject != prevGameObject) {
- light = currentGameObject.GetComponent<Light>();
- prevGameObject = currentGameObject;
- }
- }
-
- public override TaskStatus OnUpdate()
- {
- if (light == null) {
- Debug.LogWarning("Light is null");
- return TaskStatus.Failure;
- }
-
- storeValue = light.shadowSoftness;
- return TaskStatus.Success;
- }
-
- public override void OnReset()
- {
- targetGameObject = null;
- storeValue = 0;
- }
- }
-}
-#endif
\ No newline at end of file |