Files
back_cantanBuilding/Assets/Scripts/EventWashing/WashingGame/WashingGameCleanBarnacles.cs
2026-05-26 16:15:54 +08:00

67 lines
2.2 KiB
C#

using cfg;
using Cinemachine;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
namespace game
{
public class WashingGameCleanBarnacles : WashingGameRemove
{
[Tooltip("摄像机移动路径停止位置索引")]
[SerializeField] private int m_PathStopIndex = 1;
#region
protected override void OperatedItemExecuteOverAction(LongPressStuffBase stuffBase)
{
base.OperatedItemExecuteOverAction(stuffBase);
// 道具飞回展示区
m_Tool.MoveToExhibition();
m_CurOperatedItem.StopAction();
m_CurOperatedItem.gameObject.SetActive(false);
}
public override void ResetAndInitData(CinemachineVirtualCamera virtualCamera, CameraFollowPathMoveController cameraFollowPathMoveController, OperatingToolsBase tool)
{
if (virtualCamera != null)
{
m_VirtualCamera = virtualCamera;
if (m_CameraFocusedTransform != null)
{
m_VirtualCamera.LookAt = m_CameraFocusedTransform;
}
}
if (cameraFollowPathMoveController != null && m_CameraPath != null && m_RestIndexList != null)
{
m_CameraMoveController = cameraFollowPathMoveController;
m_CameraMoveController.ResetAndInit(m_CameraPath, m_RestIndexList, m_MagneticDistance);
m_CameraMoveController.JumpToRestIndex(0);
m_CameraMoveController.enabled = true;
m_CameraMoveController.Speed = m_CameraSpeed;
m_CameraMoveController.GoToPositionIndex(m_PathStopIndex);
}
if (tool != null)
{
m_Tool = tool;
m_Tool.gameObject.SetActive(true);
m_Tool.JumpToExhibition();
m_Tool.StopExecuting();
}
}
#endregion
#region
public override void InitGame(string name)
{
base.InitGame(name);
this.m_GameType = EventWashingOperation.Barnacle;
this.m_Status = EventWashingActionStatus.Invalid;
}
#endregion
}
}