Reorganize scripts into subfolders by responsibility
Move scripts under Assets/Scripts/ into Components, GameMode, Helper, Network, Enum, Struct and ScriptableObject folders. Pure file moves (plus folder .meta files); no code changes. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
1 parent
382bfb36df
commit
e23fae0c50
126 files changed
+112
No files matched your search
@@ -0,0 +1,21 @@
|
||||
using UnityEngine;
|
||||
|
||||
/// <summary>Disables a CharacterController around a transform write so it cannot snap the transform back.</summary>
|
||||
public static class CharacterTeleport
|
||||
{
|
||||
public static void Move(CharacterController cc, Transform t, Vector3 position)
|
||||
{
|
||||
bool reenable = cc && cc.enabled;
|
||||
if (cc) cc.enabled = false;
|
||||
t.position = position;
|
||||
if (cc) cc.enabled = reenable;
|
||||
}
|
||||
|
||||
public static void Move(CharacterController cc, Transform t, Vector3 position, Quaternion rotation)
|
||||
{
|
||||
bool reenable = cc && cc.enabled;
|
||||
if (cc) cc.enabled = false;
|
||||
t.SetPositionAndRotation(position, rotation);
|
||||
if (cc) cc.enabled = reenable;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user