一楼大厅优化
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@ -77,3 +77,4 @@ Assets/FR2_Cache.asset
|
||||
ProjectSettings/EditorBuildSettings.asset
|
||||
ProjectSettings/ProjectSettings.asset
|
||||
Assets/FR2_Cache.asset.meta
|
||||
ProjectSettings/GraphicsSettings.asset
|
||||
|
||||
@ -3,7 +3,7 @@ guid: 1e2950c43328b3340b8d299352defd34
|
||||
TextureImporter:
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
serializedVersion: 12
|
||||
serializedVersion: 13
|
||||
mipmaps:
|
||||
mipMapMode: 0
|
||||
enableMipMap: 1
|
||||
|
||||
@ -3,7 +3,7 @@ guid: ecff2c21b3bcfa740a37d18469252f45
|
||||
TextureImporter:
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
serializedVersion: 12
|
||||
serializedVersion: 13
|
||||
mipmaps:
|
||||
mipMapMode: 0
|
||||
enableMipMap: 1
|
||||
|
||||
66
Assets/Lighting Settings.lighting
Normal file
66
Assets/Lighting Settings.lighting
Normal file
@ -0,0 +1,66 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!850595691 &4890085278179872738
|
||||
LightingSettings:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: Lighting Settings
|
||||
serializedVersion: 6
|
||||
m_GIWorkflowMode: 1
|
||||
m_EnableBakedLightmaps: 1
|
||||
m_EnableRealtimeLightmaps: 0
|
||||
m_RealtimeEnvironmentLighting: 1
|
||||
m_BounceScale: 1
|
||||
m_AlbedoBoost: 1
|
||||
m_IndirectOutputScale: 3
|
||||
m_UsingShadowmask: 1
|
||||
m_BakeBackend: 2
|
||||
m_LightmapMaxSize: 2048
|
||||
m_BakeResolution: 120
|
||||
m_Padding: 2
|
||||
m_LightmapCompression: 3
|
||||
m_AO: 1
|
||||
m_AOMaxDistance: 1
|
||||
m_CompAOExponent: 3
|
||||
m_CompAOExponentDirect: 3
|
||||
m_ExtractAO: 0
|
||||
m_MixedBakeMode: 2
|
||||
m_LightmapsBakeMode: 1
|
||||
m_FilterMode: 1
|
||||
m_LightmapParameters: {fileID: 15200, guid: 0000000000000000f000000000000000, type: 0}
|
||||
m_ExportTrainingData: 0
|
||||
m_TrainingDataDestination: TrainingData
|
||||
m_RealtimeResolution: 2
|
||||
m_ForceWhiteAlbedo: 0
|
||||
m_ForceUpdates: 0
|
||||
m_FinalGather: 0
|
||||
m_FinalGatherRayCount: 256
|
||||
m_FinalGatherFiltering: 1
|
||||
m_PVRCulling: 1
|
||||
m_PVRSampling: 1
|
||||
m_PVRDirectSampleCount: 1024
|
||||
m_PVRSampleCount: 1024
|
||||
m_PVREnvironmentSampleCount: 1024
|
||||
m_PVREnvironmentReferencePointCount: 2048
|
||||
m_LightProbeSampleCountMultiplier: 4
|
||||
m_PVRBounces: 2
|
||||
m_PVRMinBounces: 2
|
||||
m_PVREnvironmentImportanceSampling: 1
|
||||
m_PVRFilteringMode: 2
|
||||
m_PVRDenoiserTypeDirect: 1
|
||||
m_PVRDenoiserTypeIndirect: 1
|
||||
m_PVRDenoiserTypeAO: 1
|
||||
m_PVRFilterTypeDirect: 0
|
||||
m_PVRFilterTypeIndirect: 0
|
||||
m_PVRFilterTypeAO: 0
|
||||
m_PVRFilteringGaussRadiusDirect: 2
|
||||
m_PVRFilteringGaussRadiusIndirect: 5
|
||||
m_PVRFilteringGaussRadiusAO: 2
|
||||
m_PVRFilteringAtrousPositionSigmaDirect: 0.5
|
||||
m_PVRFilteringAtrousPositionSigmaIndirect: 2
|
||||
m_PVRFilteringAtrousPositionSigmaAO: 1
|
||||
m_PVRTiledBaking: 0
|
||||
m_NumRaysToShootPerTexel: -1
|
||||
m_RespectSceneVisibilityWhenBakingGI: 0
|
||||
8
Assets/Lighting Settings.lighting.meta
Normal file
8
Assets/Lighting Settings.lighting.meta
Normal file
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: cacaba72766e15f49ad38c0b4a662a70
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 4890085278179872738
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@ -27,17 +27,123 @@ public class Mussels : MonoBehaviour
|
||||
private bool isGrabbing = false; // 钥匙是否已被抓取
|
||||
private bool success = false; // 是否已经成功拿到钥匙
|
||||
|
||||
[Header("初始状态设置")]
|
||||
public bool startOpened = true; // 是否在游戏开始时处于打开状态
|
||||
private bool tutorialComplete = false; // 教程/讲解是否完成
|
||||
|
||||
[Header("动画设置")]
|
||||
public float partialOpenDuration = 0.35f; // 微微张开的位置(秒)
|
||||
public float fullOpenDuration = 1.15f; // 完全张开所需时间(秒)
|
||||
private float partialOpenProgress = 0f; // 微微张开的进度
|
||||
private bool isPartialOpen = false; // 是否处于微微张开状态
|
||||
void Start()
|
||||
{
|
||||
animator = animator ? animator : GetComponent<Animator>();
|
||||
// 记录钥匙初始 Transform
|
||||
keyStartPos = keyTransform.position;
|
||||
keyStartRot = keyTransform.rotation;
|
||||
|
||||
// 根据设置初始化状态
|
||||
if (startOpened)
|
||||
{
|
||||
SetInitialOpenedState();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 设置初始打开状态
|
||||
/// </summary>
|
||||
private void SetInitialOpenedState()
|
||||
{
|
||||
// 计算微微张开的进度(0-1)
|
||||
partialOpenProgress = Mathf.Clamp01(partialOpenDuration / fullOpenDuration);
|
||||
|
||||
// 直接设置到微微张开状态
|
||||
animator.Play("Open", 0, partialOpenProgress);
|
||||
animator.speed = 0; // 暂停动画
|
||||
|
||||
state = ClamState.Opened; // 设置为张开状态
|
||||
isPartialOpen = true; // 标记为微微张开
|
||||
|
||||
//// 直接设置到打开状态
|
||||
//animator.Play("Open", 0, 1.0f); // 播放到动画结束
|
||||
//state = ClamState.Opened;
|
||||
|
||||
// 启用钥匙但禁用抓取功能
|
||||
keyEx.SetActive(false);
|
||||
keyPrefab.SetActive(true);
|
||||
keyPrefab.transform.position = keyStartPos;
|
||||
keyPrefab.GetComponent<Animator>().enabled = false;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 当讲解完成时调用此方法
|
||||
/// </summary>
|
||||
public void OnTutorialComplete()
|
||||
{
|
||||
tutorialComplete = true;
|
||||
|
||||
// 如果当前是微微张开状态,先完成张开动画再开始循环
|
||||
if (isPartialOpen)
|
||||
{
|
||||
StartCoroutine(CompleteOpenAnimation());
|
||||
}
|
||||
else if (state == ClamState.Opened)
|
||||
{
|
||||
StartCoroutine(CloseAfterTutorial());
|
||||
}
|
||||
else
|
||||
{
|
||||
StartCoroutine(OpenCloseLoop());
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 从微微张开状态继续完成张开动画
|
||||
/// </summary>
|
||||
private IEnumerator CompleteOpenAnimation()
|
||||
{
|
||||
// 恢复动画速度
|
||||
animator.speed = 1;
|
||||
|
||||
// 计算剩余动画时间(从微微张开到完全张开)
|
||||
float remainingTime = fullOpenDuration * (1f - partialOpenProgress);
|
||||
|
||||
// 等待动画完成
|
||||
state = ClamState.Opening;
|
||||
yield return new WaitForSeconds(remainingTime);
|
||||
state = ClamState.Opened;
|
||||
isPartialOpen = false; // 不再是微微张开状态
|
||||
|
||||
// 停留随机时间后关闭
|
||||
float stay = Random.Range(stayOpenMin, stayOpenMax);
|
||||
yield return new WaitForSeconds(stay);
|
||||
|
||||
// 开始正常开合循环
|
||||
StartCoroutine(OpenCloseLoop());
|
||||
}
|
||||
|
||||
private IEnumerator CloseAfterTutorial()
|
||||
{
|
||||
// 播放闭合动画
|
||||
state = ClamState.Closing;
|
||||
animator.ResetTrigger("Open");
|
||||
animator.SetTrigger("Close");
|
||||
yield return new WaitUntil(() => CheckAnimFinished("Close"));
|
||||
state = ClamState.Closed;
|
||||
|
||||
// 等待片刻后开始正常循环
|
||||
yield return new WaitForSeconds(1f);
|
||||
StartCoroutine(OpenCloseLoop());
|
||||
}
|
||||
|
||||
public void StartTask()
|
||||
{
|
||||
StartCoroutine(OpenCloseLoop());
|
||||
// 仅在教程完成后开始任务
|
||||
if (tutorialComplete)
|
||||
{
|
||||
StartCoroutine(OpenCloseLoop());
|
||||
}
|
||||
}
|
||||
|
||||
private IEnumerator OpenCloseLoop()
|
||||
@ -64,7 +170,7 @@ public class Mussels : MonoBehaviour
|
||||
if (success)
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
// 如果在闭合完毕时,钥匙正被抓着,说明玩家“失败”——震动、重置钥匙
|
||||
if (isGrabbing && !success)
|
||||
{
|
||||
@ -103,24 +209,24 @@ public class Mussels : MonoBehaviour
|
||||
|
||||
private void Update()
|
||||
{
|
||||
if (isGrabbing&&!success&&state==ClamState.Opened)
|
||||
if (isGrabbing && !success && state == ClamState.Opened)
|
||||
{
|
||||
keyPrefab.transform.position=GameOnline.Ins.playerHand.transform.position;
|
||||
keyPrefab.transform.rotation=GameOnline.Ins.playerHand.transform.rotation;
|
||||
keyPrefab.transform.position = GameOnline.Ins.playerHand.transform.position;
|
||||
keyPrefab.transform.rotation = GameOnline.Ins.playerHand.transform.rotation;
|
||||
}
|
||||
|
||||
if (isGrabbing)
|
||||
{
|
||||
float dir = Vector3.Distance(keyPrefab.transform.position.XOZ(),keyStartPos.XOZ());
|
||||
float dir = Vector3.Distance(keyPrefab.transform.position.XOZ(), keyStartPos.XOZ());
|
||||
success = dir > 0.8f;
|
||||
if (success)
|
||||
{
|
||||
isGrabbing = false;
|
||||
StartCoroutine(GetKey());
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
if (isGrabbing&& !MRInput.Ins.pressRightTrigger)
|
||||
if (isGrabbing && !MRInput.Ins.pressRightTrigger)
|
||||
{
|
||||
isGrabbing = false;
|
||||
// 失败反馈
|
||||
@ -130,20 +236,23 @@ public class Mussels : MonoBehaviour
|
||||
keyPrefab.transform.rotation = keyStartRot;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private bool CheckAnimFinished(string stateName)
|
||||
{
|
||||
var info = animator.GetCurrentAnimatorStateInfo(0);
|
||||
return info.IsName(stateName) && info.normalizedTime >= 1f;
|
||||
}
|
||||
|
||||
|
||||
public void TryGetKey(Vector3 handPos)
|
||||
{
|
||||
bool isTrigger=Vector3.Distance(keyPrefab.transform.position,handPos) <= 0.3f;
|
||||
if ( !isGrabbing &&isTrigger)
|
||||
// 仅在教程完成后启用抓取
|
||||
if (!tutorialComplete) return;
|
||||
|
||||
bool isTrigger = Vector3.Distance(keyPrefab.transform.position, handPos) <= 0.3f;
|
||||
if (!isGrabbing && isTrigger)
|
||||
{
|
||||
isGrabbing = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@ -1,10 +1,11 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using DarkTonic.MasterAudio;
|
||||
using DG.Tweening;
|
||||
using DragonLi.Core;
|
||||
using EPOOutline;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UnityEngine.Analytics;
|
||||
|
||||
public class WreckTask : Task
|
||||
{
|
||||
@ -110,8 +111,10 @@ public class WreckTask : Task
|
||||
yield return new WaitForSeconds(5f);
|
||||
//说完后移动到海蚌旁边
|
||||
Vector3 startPos = taskFishPre.transform.position;
|
||||
Vector3 endPos = new Vector3(taskPos1.position.x,startPos.y,taskPos1.position.z);
|
||||
//Vector3 endPos = new Vector3(taskPos1.position.x,startPos.y,taskPos1.position.z);
|
||||
Vector3 endPos = taskPos1.position;
|
||||
Quaternion startRot = taskFishPre.transform.rotation;
|
||||
Quaternion endRot = taskPos1.rotation;
|
||||
float duration = 5;
|
||||
float elapsed = 0f;
|
||||
while (elapsed < duration)
|
||||
@ -122,24 +125,34 @@ public class WreckTask : Task
|
||||
// 插值位置
|
||||
taskFishPre.transform.position = Vector3.Lerp(startPos, endPos, t);
|
||||
|
||||
// 计算面向目标的期望旋转
|
||||
Vector3 dir = (new Vector3(taskPos1.position.x,startPos.y,taskPos1.position.z) - taskFishPre.transform.position).normalized;
|
||||
if (dir.sqrMagnitude > 0.001f)
|
||||
{
|
||||
Quaternion targetRot = Quaternion.LookRotation(dir);
|
||||
// 平滑插值旋转,这里可以调节 10f 改变转向速度
|
||||
taskFishPre.transform.rotation = Quaternion.Slerp(startRot, targetRot, t);
|
||||
}
|
||||
//// 计算面向目标的期望旋转
|
||||
//Vector3 dir = (new Vector3(taskPos1.position.x,startPos.y,taskPos1.position.z) - taskFishPre.transform.position).normalized;
|
||||
//if (dir.sqrMagnitude > 0.001f)
|
||||
//{
|
||||
// Quaternion targetRot = Quaternion.LookRotation(dir);
|
||||
// // 平滑插值旋转,这里可以调节 10f 改变转向速度
|
||||
// taskFishPre.transform.rotation = Quaternion.Slerp(startRot, targetRot, t);
|
||||
//}
|
||||
|
||||
taskFishPre.transform.rotation = Quaternion.Slerp(
|
||||
startRot,
|
||||
endRot,
|
||||
t
|
||||
);
|
||||
|
||||
elapsed += Time.deltaTime;
|
||||
yield return null;
|
||||
}
|
||||
|
||||
// 确保最后一点
|
||||
taskFishPre.transform.position = endPos;
|
||||
taskFishPre.transform.rotation = Quaternion.LookRotation((taskPos1.position - startPos).normalized);
|
||||
//taskFishPre.transform.rotation = Quaternion.LookRotation((taskPos1.position - startPos).normalized);
|
||||
taskFishPre.transform.rotation = endRot;
|
||||
MasterAudio.PlaySound3DAtTransform("1.10", GameLocal.Ins.self.transform);
|
||||
yield return new WaitForSeconds(6);
|
||||
mussels.StartTask();
|
||||
// 完成教程(启动海蚌开合循环)
|
||||
mussels.OnTutorialComplete();
|
||||
//mussels.StartTask();
|
||||
GameOnline.Ins.playerHand.ChangeWeapon(1);
|
||||
}
|
||||
|
||||
|
||||
@ -25,6 +25,11 @@ public class WreckTask2 : MonoBehaviour
|
||||
|
||||
public List<WreckTaskFish> fishList = new List<WreckTaskFish>();
|
||||
|
||||
// 添加摆动动画相关变量
|
||||
[Header("鱼群消失动画设置")]
|
||||
public float swingAnimationDuration = 2f; // 摆动动画持续时间
|
||||
public float fadeOutDuration = 0.5f; // 淡出动画持续时间
|
||||
|
||||
public void Init()
|
||||
{
|
||||
catchIndex = 0;
|
||||
@ -75,10 +80,20 @@ public class WreckTask2 : MonoBehaviour
|
||||
|
||||
IEnumerator GetKey(Vector3 curFishPos)
|
||||
{
|
||||
// 1.停止所有鱼的移动
|
||||
foreach (var fish in fishList)
|
||||
{
|
||||
fish.Stop(-1);
|
||||
}
|
||||
// 2.播放鱼群摆动动画
|
||||
StartCoroutine(PlayFishSwingAnimation());
|
||||
|
||||
// 3.等待摆动动画完成
|
||||
yield return new WaitForSeconds(swingAnimationDuration);
|
||||
|
||||
// 4.鱼群淡出消失
|
||||
yield return StartCoroutine(FadeOutFish());
|
||||
|
||||
fishList.Clear();
|
||||
GameOnline.Ins.OverCatch();
|
||||
yield return new WaitForSeconds(3f);
|
||||
@ -91,5 +106,92 @@ public class WreckTask2 : MonoBehaviour
|
||||
wreckTask.ComposeKey();
|
||||
|
||||
}
|
||||
/// <summary>
|
||||
/// 播放鱼群摆动动画
|
||||
/// </summary>
|
||||
private IEnumerator PlayFishSwingAnimation()
|
||||
{
|
||||
// 所有鱼同时播放摆动动画
|
||||
foreach (var fish in fishList)
|
||||
{
|
||||
// 随机摆动幅度和频率
|
||||
float amplitude = Random.Range(0.1f, 0.3f);
|
||||
float frequency = Random.Range(1f, 3f);
|
||||
|
||||
// 使用DoTween制作摆动动画
|
||||
fish.transform.DOShakePosition(swingAnimationDuration,
|
||||
new Vector3(amplitude, amplitude * 0.5f, 0),
|
||||
Mathf.RoundToInt(frequency * 10), 90, false, true);
|
||||
|
||||
// 添加轻微旋转摆动
|
||||
fish.transform.DOShakeRotation(swingAnimationDuration,
|
||||
new Vector3(0, 0, amplitude * 30),
|
||||
Mathf.RoundToInt(frequency * 5), 90, true);
|
||||
}
|
||||
|
||||
yield return new WaitForSeconds(swingAnimationDuration);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 鱼群淡出消失动画
|
||||
/// </summary>
|
||||
private IEnumerator FadeOutFish()
|
||||
{
|
||||
// 存储所有鱼的渲染器
|
||||
List<Renderer> fishRenderers = new List<Renderer>();
|
||||
foreach (var fish in fishList)
|
||||
{
|
||||
Renderer renderer = fish.GetComponent<Renderer>();
|
||||
if (renderer != null)
|
||||
{
|
||||
fishRenderers.Add(renderer);
|
||||
}
|
||||
}
|
||||
|
||||
// 淡出动画
|
||||
float elapsed = 0f;
|
||||
while (elapsed < fadeOutDuration)
|
||||
{
|
||||
float alpha = Mathf.Lerp(1f, 0f, elapsed / fadeOutDuration);
|
||||
|
||||
foreach (var renderer in fishRenderers)
|
||||
{
|
||||
if (renderer != null)
|
||||
{
|
||||
// 更新材质颜色透明度
|
||||
foreach (Material mat in renderer.materials)
|
||||
{
|
||||
Color color = mat.color;
|
||||
color.a = alpha;
|
||||
mat.color = color;
|
||||
}
|
||||
|
||||
// 同时缩小
|
||||
renderer.transform.localScale = Vector3.one * (0.5f + alpha * 0.5f);
|
||||
}
|
||||
}
|
||||
|
||||
elapsed += Time.deltaTime;
|
||||
yield return null;
|
||||
}
|
||||
|
||||
// 确保完全消失
|
||||
foreach (var renderer in fishRenderers)
|
||||
{
|
||||
if (renderer != null)
|
||||
{
|
||||
// 重置材质透明度
|
||||
foreach (Material mat in renderer.materials)
|
||||
{
|
||||
Color color = mat.color;
|
||||
color.a = 1f;
|
||||
mat.color = color;
|
||||
}
|
||||
|
||||
// 销毁鱼对象
|
||||
Destroy(renderer.gameObject);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -23,6 +23,12 @@ public class WreckTaskFish : MonoBehaviour
|
||||
public float maxOrbitSpeed = 40f; // 最大角速度(度/秒)
|
||||
public float interpolationSpeed = 5f; // 位置和旋转平滑速度
|
||||
|
||||
[Header("高度设置")]
|
||||
public float minHeight = 0.5f; //最低高度
|
||||
public float midHeight = 0.8f; //中间高度
|
||||
public float maxHeight = 1.5f; //最高高度
|
||||
public float heightChangeInterval = 3f; //高度变化间隔
|
||||
|
||||
private Vector3 initialOffset; // 初始水平偏移
|
||||
private float initialRadius; // 初始半径
|
||||
private float angle; // 当前角度(度)
|
||||
@ -30,6 +36,8 @@ public class WreckTaskFish : MonoBehaviour
|
||||
private int directionSign; // 绕圈方向:1 顺时针,-1 逆时针
|
||||
|
||||
private Vector3 startPos;
|
||||
private float targetHeight; //当前目标高度
|
||||
private float heightTimer; //高度变化计时器
|
||||
void Start()
|
||||
{
|
||||
startPos = GameLocal.Ins.self.transform.position;
|
||||
@ -43,13 +51,20 @@ public class WreckTaskFish : MonoBehaviour
|
||||
// 随机角速度与方向
|
||||
orbitSpeed = Random.Range(minOrbitSpeed, maxOrbitSpeed);
|
||||
directionSign = Random.value < 0.5f ? 1 : -1;
|
||||
|
||||
//初始化高度系统
|
||||
targetHeight = transform.position.y;//初始保持当前高度
|
||||
heightTimer = heightChangeInterval;//立即触发第一次高度变化
|
||||
}
|
||||
|
||||
private void Update()
|
||||
{
|
||||
if(isStop)
|
||||
return;
|
||||
|
||||
|
||||
//更新高度
|
||||
UpdateHeightTarget();
|
||||
|
||||
// 更新角度
|
||||
angle += directionSign * orbitSpeed * Time.deltaTime;
|
||||
angle = Mathf.Repeat(angle, 360f);
|
||||
@ -61,6 +76,10 @@ public class WreckTaskFish : MonoBehaviour
|
||||
targetPos.z += Mathf.Sin(rad) * initialRadius;
|
||||
targetPos.y = transform.position.y; // 保持原始高度
|
||||
|
||||
//平滑过渡到目标高度
|
||||
float currentY = Mathf.Lerp(transform.position.y, targetHeight, interpolationSpeed * Time.deltaTime);
|
||||
targetPos.y = currentY;
|
||||
|
||||
// 插值平滑移动到目标位置
|
||||
transform.position = Vector3.Lerp(transform.position, targetPos, interpolationSpeed * Time.deltaTime);
|
||||
|
||||
@ -74,6 +93,23 @@ public class WreckTaskFish : MonoBehaviour
|
||||
}
|
||||
}
|
||||
|
||||
//管理高度变化
|
||||
private void UpdateHeightTarget()
|
||||
{
|
||||
//计时器更新
|
||||
heightTimer -= Time.deltaTime;
|
||||
|
||||
if (heightTimer <= 0)
|
||||
{
|
||||
//随机选择三种高度
|
||||
float[] possibleHeights = { minHeight, midHeight, maxHeight };
|
||||
targetHeight = possibleHeights[Random.Range(0, possibleHeights.Length)];
|
||||
|
||||
//重置计时器
|
||||
heightTimer = heightChangeInterval + Random.Range(-0.5f, 0.5f);
|
||||
}
|
||||
}
|
||||
|
||||
private int curIdindex;
|
||||
public void Stop(int curId)
|
||||
{
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -98,7 +98,7 @@ LightmapSettings:
|
||||
m_LightProbeSampleCountMultiplier: 4
|
||||
m_LightingDataAsset: {fileID: 112000000, guid: 266d03f0c3086f1499d447d8605db62e,
|
||||
type: 2}
|
||||
m_LightingSettings: {fileID: 4890085278179872738, guid: 9b4b9b544462e1f47bd7ae0ef8cb6c51,
|
||||
m_LightingSettings: {fileID: 4890085278179872738, guid: cacaba72766e15f49ad38c0b4a662a70,
|
||||
type: 2}
|
||||
--- !u!196 &4
|
||||
NavMeshSettings:
|
||||
@ -76685,74 +76685,6 @@ AudioSource:
|
||||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
m_RotationOrder: 4
|
||||
--- !u!1001 &1549344702
|
||||
PrefabInstance:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 2
|
||||
m_Modification:
|
||||
serializedVersion: 3
|
||||
m_TransformParent: {fileID: 0}
|
||||
m_Modifications:
|
||||
- target: {fileID: 1553828426008219873, guid: 0628401ed9934c94589cf51fe13bcee7,
|
||||
type: 3}
|
||||
propertyPath: m_Name
|
||||
value: "\u5C71\u4E1C\u6F4D\u574A\u9752\u5DDE\u6CF0\u534E\u57CE\u5730\u5F62(\u5C0F\u5C0F\u5E7B\u5BA0\uFF09"
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6408020577650867696, guid: 0628401ed9934c94589cf51fe13bcee7,
|
||||
type: 3}
|
||||
propertyPath: m_LocalPosition.x
|
||||
value: 9.39
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6408020577650867696, guid: 0628401ed9934c94589cf51fe13bcee7,
|
||||
type: 3}
|
||||
propertyPath: m_LocalPosition.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6408020577650867696, guid: 0628401ed9934c94589cf51fe13bcee7,
|
||||
type: 3}
|
||||
propertyPath: m_LocalPosition.z
|
||||
value: 17.742863
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6408020577650867696, guid: 0628401ed9934c94589cf51fe13bcee7,
|
||||
type: 3}
|
||||
propertyPath: m_LocalRotation.w
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6408020577650867696, guid: 0628401ed9934c94589cf51fe13bcee7,
|
||||
type: 3}
|
||||
propertyPath: m_LocalRotation.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6408020577650867696, guid: 0628401ed9934c94589cf51fe13bcee7,
|
||||
type: 3}
|
||||
propertyPath: m_LocalRotation.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6408020577650867696, guid: 0628401ed9934c94589cf51fe13bcee7,
|
||||
type: 3}
|
||||
propertyPath: m_LocalRotation.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6408020577650867696, guid: 0628401ed9934c94589cf51fe13bcee7,
|
||||
type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6408020577650867696, guid: 0628401ed9934c94589cf51fe13bcee7,
|
||||
type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6408020577650867696, guid: 0628401ed9934c94589cf51fe13bcee7,
|
||||
type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
m_RemovedComponents: []
|
||||
m_RemovedGameObjects: []
|
||||
m_AddedGameObjects: []
|
||||
m_AddedComponents: []
|
||||
m_SourcePrefab: {fileID: 100100000, guid: 0628401ed9934c94589cf51fe13bcee7, type: 3}
|
||||
--- !u!1 &1560641705
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@ -223581,5 +223513,4 @@ SceneRoots:
|
||||
- {fileID: 1234419060}
|
||||
- {fileID: 584406380}
|
||||
- {fileID: 151548133}
|
||||
- {fileID: 1549344702}
|
||||
- {fileID: 1632360467}
|
||||
|
||||
@ -96,6 +96,7 @@ public class Player : MonoBehaviour
|
||||
{
|
||||
GameOnline.Ins.GameStart();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -88,18 +88,18 @@ MonoBehaviour:
|
||||
m_PrefilterXRKeywords: 0
|
||||
m_PrefilteringModeForwardPlus: 0
|
||||
m_PrefilteringModeDeferredRendering: 0
|
||||
m_PrefilteringModeScreenSpaceOcclusion: 0
|
||||
m_PrefilteringModeScreenSpaceOcclusion: 2
|
||||
m_PrefilterDebugKeywords: 1
|
||||
m_PrefilterWriteRenderingLayers: 1
|
||||
m_PrefilterHDROutput: 1
|
||||
m_PrefilterSSAODepthNormals: 1
|
||||
m_PrefilterSSAODepthNormals: 0
|
||||
m_PrefilterSSAOSourceDepthLow: 1
|
||||
m_PrefilterSSAOSourceDepthMedium: 1
|
||||
m_PrefilterSSAOSourceDepthHigh: 1
|
||||
m_PrefilterSSAOInterleaved: 1
|
||||
m_PrefilterSSAOInterleaved: 0
|
||||
m_PrefilterSSAOBlueNoise: 1
|
||||
m_PrefilterSSAOSampleCountLow: 1
|
||||
m_PrefilterSSAOSampleCountMedium: 1
|
||||
m_PrefilterSSAOSampleCountMedium: 0
|
||||
m_PrefilterSSAOSampleCountHigh: 1
|
||||
m_PrefilterDBufferMRT1: 1
|
||||
m_PrefilterDBufferMRT2: 1
|
||||
|
||||
@ -31,9 +31,10 @@ MonoBehaviour:
|
||||
hdrDebugViewPS: {fileID: 4800000, guid: 573620ae32aec764abd4d728906d2587, type: 3}
|
||||
m_RendererFeatures:
|
||||
- {fileID: 4125616689449885798}
|
||||
m_RendererFeatureMap: 6660154685224139
|
||||
- {fileID: 2754760380640276390}
|
||||
m_RendererFeatureMap: 6660154685224139a62f6289f8df3a26
|
||||
m_UseNativeRenderPass: 0
|
||||
postProcessData: {fileID: 0}
|
||||
postProcessData: {fileID: 11400000, guid: 41439944d30ece34e96484bdb6645b55, type: 2}
|
||||
xrSystemData: {fileID: 11400000, guid: 60e1133243b97e347b653163a8c01b64, type: 2}
|
||||
shaders:
|
||||
blitPS: {fileID: 4800000, guid: c17132b1f77d20942aa75f8429c0f8bc, type: 3}
|
||||
@ -74,6 +75,41 @@ MonoBehaviour:
|
||||
m_CopyDepthMode: 0
|
||||
m_AccurateGbufferNormals: 0
|
||||
m_IntermediateTextureMode: 1
|
||||
--- !u!114 &2754760380640276390
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: f62c9c65cf3354c93be831c8bc075510, type: 3}
|
||||
m_Name: ScreenSpaceAmbientOcclusion
|
||||
m_EditorClassIdentifier:
|
||||
m_Active: 1
|
||||
m_Settings:
|
||||
AOMethod: 1
|
||||
Downsample: 0
|
||||
AfterOpaque: 0
|
||||
Source: 1
|
||||
NormalSamples: 1
|
||||
Intensity: 2
|
||||
DirectLightingStrength: 0.25
|
||||
Radius: 0.035
|
||||
Samples: 1
|
||||
BlurQuality: 0
|
||||
Falloff: 100
|
||||
SampleCount: -1
|
||||
m_BlueNoise256Textures:
|
||||
- {fileID: 2800000, guid: 36f118343fc974119bee3d09e2111500, type: 3}
|
||||
- {fileID: 2800000, guid: 4b7b083e6b6734e8bb2838b0b50a0bc8, type: 3}
|
||||
- {fileID: 2800000, guid: c06cc21c692f94f5fb5206247191eeee, type: 3}
|
||||
- {fileID: 2800000, guid: cb76dd40fa7654f9587f6a344f125c9a, type: 3}
|
||||
- {fileID: 2800000, guid: e32226222ff144b24bf3a5a451de54bc, type: 3}
|
||||
- {fileID: 2800000, guid: 3302065f671a8450b82c9ddf07426f3a, type: 3}
|
||||
- {fileID: 2800000, guid: 56a77a3e8d64f47b6afe9e3c95cb57d5, type: 3}
|
||||
m_Shader: {fileID: 4800000, guid: 0849e84e3d62649e8882e9d6f056a017, type: 3}
|
||||
--- !u!114 &4125616689449885798
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
|
||||
@ -118,7 +118,7 @@ Material:
|
||||
- _ZWrite: 0
|
||||
m_Colors:
|
||||
- _BaseColor: {r: 0.24999997, g: 0.6086575, b: 1, a: 0.4392157}
|
||||
- _Color: {r: 0.24999997, g: 0.6086575, b: 1, a: 0.4392157}
|
||||
- _Color: {r: 0.24999994, g: 0.6086575, b: 1, a: 0.4392157}
|
||||
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
|
||||
- _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1}
|
||||
m_BuildTextureStacks: []
|
||||
|
||||
@ -129,7 +129,7 @@ Material:
|
||||
- _ZWrite: 1
|
||||
m_Colors:
|
||||
- _BaseColor: {r: 0.92378104, g: 0.89444804, b: 0.37144187, a: 1}
|
||||
- _Color: {r: 0.92378104, g: 0.89444804, b: 0.37144187, a: 1}
|
||||
- _Color: {r: 0.92378104, g: 0.89444804, b: 0.37144184, a: 1}
|
||||
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
|
||||
- _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1}
|
||||
m_BuildTextureStacks: []
|
||||
|
||||
@ -79,7 +79,7 @@ Material:
|
||||
- _BaseColor: {r: 0.3301887, g: 0.3301887, b: 0.3301887, a: 1}
|
||||
- _BaseColorAddSubDiff: {r: -1, g: 1, b: 0, a: 0}
|
||||
- _CameraFadeParams: {r: 0, g: Infinity, b: 0, a: 0}
|
||||
- _Color: {r: 0.3301887, g: 0.3301887, b: 0.3301887, a: 1}
|
||||
- _Color: {r: 0.33018863, g: 0.33018863, b: 0.33018863, a: 1}
|
||||
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
|
||||
- _SoftParticleFadeParams: {r: 0, g: 0, b: 0, a: 0}
|
||||
m_BuildTextureStacks: []
|
||||
|
||||
@ -1,74 +0,0 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!30 &1
|
||||
GraphicsSettings:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 15
|
||||
m_Deferred:
|
||||
m_Mode: 1
|
||||
m_Shader: {fileID: 69, guid: 0000000000000000f000000000000000, type: 0}
|
||||
m_DeferredReflections:
|
||||
m_Mode: 1
|
||||
m_Shader: {fileID: 74, guid: 0000000000000000f000000000000000, type: 0}
|
||||
m_ScreenSpaceShadows:
|
||||
m_Mode: 1
|
||||
m_Shader: {fileID: 64, guid: 0000000000000000f000000000000000, type: 0}
|
||||
m_DepthNormals:
|
||||
m_Mode: 1
|
||||
m_Shader: {fileID: 62, guid: 0000000000000000f000000000000000, type: 0}
|
||||
m_MotionVectors:
|
||||
m_Mode: 1
|
||||
m_Shader: {fileID: 75, guid: 0000000000000000f000000000000000, type: 0}
|
||||
m_LightHalo:
|
||||
m_Mode: 1
|
||||
m_Shader: {fileID: 105, guid: 0000000000000000f000000000000000, type: 0}
|
||||
m_LensFlare:
|
||||
m_Mode: 1
|
||||
m_Shader: {fileID: 102, guid: 0000000000000000f000000000000000, type: 0}
|
||||
m_VideoShadersIncludeMode: 2
|
||||
m_AlwaysIncludedShaders:
|
||||
- {fileID: 7, guid: 0000000000000000f000000000000000, type: 0}
|
||||
- {fileID: 15104, guid: 0000000000000000f000000000000000, type: 0}
|
||||
- {fileID: 15105, guid: 0000000000000000f000000000000000, type: 0}
|
||||
- {fileID: 15106, guid: 0000000000000000f000000000000000, type: 0}
|
||||
- {fileID: 10753, guid: 0000000000000000f000000000000000, type: 0}
|
||||
- {fileID: 10770, guid: 0000000000000000f000000000000000, type: 0}
|
||||
- {fileID: 10783, guid: 0000000000000000f000000000000000, type: 0}
|
||||
- {fileID: 16000, guid: 0000000000000000f000000000000000, type: 0}
|
||||
- {fileID: 16001, guid: 0000000000000000f000000000000000, type: 0}
|
||||
- {fileID: 17000, guid: 0000000000000000f000000000000000, type: 0}
|
||||
m_PreloadedShaders: []
|
||||
m_PreloadShadersBatchTimeLimit: -1
|
||||
m_SpritesDefaultMaterial: {fileID: 10754, guid: 0000000000000000f000000000000000,
|
||||
type: 0}
|
||||
m_CustomRenderPipeline: {fileID: 11400000, guid: 6069160253e94a44481c8fb4a7985921,
|
||||
type: 2}
|
||||
m_TransparencySortMode: 0
|
||||
m_TransparencySortAxis: {x: 0, y: 0, z: 1}
|
||||
m_DefaultRenderingPath: 1
|
||||
m_DefaultMobileRenderingPath: 1
|
||||
m_TierSettings: []
|
||||
m_LightmapStripping: 0
|
||||
m_FogStripping: 0
|
||||
m_InstancingStripping: 0
|
||||
m_BrgStripping: 0
|
||||
m_LightmapKeepPlain: 1
|
||||
m_LightmapKeepDirCombined: 1
|
||||
m_LightmapKeepDynamicPlain: 1
|
||||
m_LightmapKeepDynamicDirCombined: 1
|
||||
m_LightmapKeepShadowMask: 1
|
||||
m_LightmapKeepSubtractive: 1
|
||||
m_FogKeepLinear: 1
|
||||
m_FogKeepExp: 1
|
||||
m_FogKeepExp2: 1
|
||||
m_AlbedoSwatchInfos: []
|
||||
m_LightsUseLinearIntensity: 0
|
||||
m_LightsUseColorTemperature: 1
|
||||
m_DefaultRenderingLayerMask: 1
|
||||
m_LogWhenShaderIsCompiled: 0
|
||||
m_SRPDefaultSettings:
|
||||
UnityEngine.Rendering.Universal.UniversalRenderPipeline: {fileID: 11400000, guid: 0f423533b364f6b47aeb75def967c61c,
|
||||
type: 2}
|
||||
m_LightProbeOutsideHullStrategy: 0
|
||||
m_CameraRelativeLightCulling: 0
|
||||
m_CameraRelativeShadowCulling: 0
|
||||
Reference in New Issue
Block a user