chore: clean up and reorganize files
This commit is contained in:
@@ -1,8 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f13157381d6fb6040abab2d065cfc6e5
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,8 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 998ca963664cdba409eb7e9bdb3d997a
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,28 +0,0 @@
|
||||
using UnityEngine;
|
||||
|
||||
public class BoatMover : MonoBehaviour
|
||||
{
|
||||
[SerializeField] private Transform _target;
|
||||
[SerializeField] private float _speed = 2f;
|
||||
[SerializeField] private float _tiltAmount = 3f;
|
||||
[SerializeField] private float _tiltSpeed = 0.8f;
|
||||
|
||||
private Vector3 _startPosition;
|
||||
private Quaternion _startRotation;
|
||||
|
||||
void Start()
|
||||
{
|
||||
_startPosition = transform.position;
|
||||
_startRotation = transform.rotation;
|
||||
}
|
||||
|
||||
void Update()
|
||||
{
|
||||
if (_target == null) return;
|
||||
|
||||
transform.position = Vector3.MoveTowards(transform.position, _target.position, _speed * Time.deltaTime);
|
||||
|
||||
float tilt = Mathf.Sin(Time.time * _tiltSpeed) * _tiltAmount;
|
||||
transform.rotation = _startRotation * Quaternion.Euler(tilt, 0, tilt * 0.5f);
|
||||
}
|
||||
}
|
||||
-2
@@ -1,2 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 2ad389ae7a3c264478f56add3bdc53f1
|
||||
-22
@@ -1,22 +0,0 @@
|
||||
using OctoCore.Components;
|
||||
using UnityEngine;
|
||||
|
||||
public class BoatPlayerSync : MonoBehaviour
|
||||
{
|
||||
private Vector3 _lastPosition;
|
||||
|
||||
void OnEnable()
|
||||
{
|
||||
_lastPosition = transform.position;
|
||||
}
|
||||
|
||||
void Update()
|
||||
{
|
||||
if (OctoPlayer.Instance == null) return;
|
||||
|
||||
Vector3 delta = transform.position - _lastPosition;
|
||||
OctoPlayer.Instance.GetComponent<CharacterController>().Move(delta);
|
||||
|
||||
_lastPosition = transform.position;
|
||||
}
|
||||
}
|
||||
-2
@@ -1,2 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 2ff2be398108c8842bb01e0bb8f52f54
|
||||
Reference in New Issue
Block a user