Felipe Lira
8 年前
当前提交
8265d3ce
共有 12 个文件被更改,包括 989 次插入 和 82 次删除
-
842Assets/GraphicsTests/RenderPipeline/LightweightPipeline/Scenes/MultiplePointLights.unity
-
19Assets/ScriptableRenderPipeline/LightweightPipeline/Editor/LightweightAssetInspector.cs
-
54Assets/ScriptableRenderPipeline/LightweightPipeline/LightweightPipeline.cs
-
19Assets/ScriptableRenderPipeline/LightweightPipeline/Shaders/LightweightPipeline.shader
-
2Assets/ScriptableRenderPipeline/LightweightPipeline/Shaders/LightweightPipelineCore.cginc
-
50Assets/ScriptableRenderPipeline/LightweightPipeline/TestScenes/LDRenderPipelineBasicScene.unity
-
10Assets/GraphicsTests/RenderPipeline/LightweightPipeline/Assets/Scripts.meta
-
34Assets/GraphicsTests/RenderPipeline/LightweightPipeline/Assets/Scripts/Boomerang.cs
-
13Assets/GraphicsTests/RenderPipeline/LightweightPipeline/Assets/Scripts/Boomerang.cs.meta
-
15Assets/GraphicsTests/RenderPipeline/LightweightPipeline/Assets/Scripts/RotateAround.cs
-
13Assets/GraphicsTests/RenderPipeline/LightweightPipeline/Assets/Scripts/RotateAround.cs.meta
842
Assets/GraphicsTests/RenderPipeline/LightweightPipeline/Scenes/MultiplePointLights.unity
文件差异内容过多而无法显示
查看文件
文件差异内容过多而无法显示
查看文件
|
|||
fileFormatVersion: 2 |
|||
guid: ac5e33c9370558b4d88db4eca81a4c4f |
|||
folderAsset: yes |
|||
timeCreated: 1498746585 |
|||
licenseType: Pro |
|||
DefaultImporter: |
|||
externalObjects: {} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
using System.Collections; |
|||
using UnityEngine; |
|||
|
|||
public class Boomerang : MonoBehaviour |
|||
{ |
|||
public Transform m_Target1; |
|||
public Transform m_Target2; |
|||
public float m_Speed = 2f; |
|||
|
|||
private Vector3 m_Direction; |
|||
private Vector3[] m_Targets = new Vector3[2]; |
|||
private int m_TargetIndex = 0; |
|||
|
|||
void OnEnable() |
|||
{ |
|||
m_Targets[0] = m_Target1.position; |
|||
m_Targets[1] = m_Target2.position; |
|||
transform.position = m_Targets[0]; |
|||
m_Direction = Vector3.Normalize(m_Targets[1] - m_Targets[0]); |
|||
|
|||
m_TargetIndex = 1; |
|||
} |
|||
|
|||
void Update() |
|||
{ |
|||
transform.position += m_Direction * m_Speed * Time.deltaTime; |
|||
Vector3 targetPosVec = m_Targets[m_TargetIndex] - transform.position; |
|||
if (Vector3.Dot(targetPosVec, m_Direction) < 0) |
|||
{ |
|||
m_TargetIndex = (m_TargetIndex + 1) % 2; |
|||
m_Direction = -m_Direction; |
|||
} |
|||
} |
|||
} |
|
|||
fileFormatVersion: 2 |
|||
guid: e41d23cf7d8aa3f4cad90e0f87b9db57 |
|||
timeCreated: 1498748776 |
|||
licenseType: Pro |
|||
MonoImporter: |
|||
externalObjects: {} |
|||
serializedVersion: 2 |
|||
defaultReferences: [] |
|||
executionOrder: 0 |
|||
icon: {instanceID: 0} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
using System.Collections; |
|||
using System.Collections.Generic; |
|||
using UnityEngine; |
|||
|
|||
public class RotateAround : MonoBehaviour |
|||
{ |
|||
public Transform m_RotationPivot; |
|||
public float m_DegreePerSecond; |
|||
|
|||
public void Update() |
|||
{ |
|||
float step = m_DegreePerSecond * Time.deltaTime; |
|||
transform.RotateAround(m_RotationPivot.transform.position, Vector3.up, step); |
|||
} |
|||
} |
|
|||
fileFormatVersion: 2 |
|||
guid: 200ecff91ea6fc2429eb4ae8898b002d |
|||
timeCreated: 1498746574 |
|||
licenseType: Pro |
|||
MonoImporter: |
|||
externalObjects: {} |
|||
serializedVersion: 2 |
|||
defaultReferences: [] |
|||
executionOrder: 0 |
|||
icon: {instanceID: 0} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
撰写
预览
正在加载...
取消
保存
Reference in new issue