mirror of
https://github.com/GTA-ASM/SanAndreasUnity
synced 2025-02-16 21:08:28 +00:00
create TransformDataStruct struct
This commit is contained in:
parent
a3f73edef8
commit
267c5d00a1
2 changed files with 47 additions and 0 deletions
36
Assets/Scripts/Utilities/TransformDataStruct.cs
Normal file
36
Assets/Scripts/Utilities/TransformDataStruct.cs
Normal file
|
@ -0,0 +1,36 @@
|
|||
using UnityEngine;
|
||||
|
||||
namespace SanAndreasUnity.Utilities
|
||||
{
|
||||
|
||||
public struct TransformDataStruct
|
||||
{
|
||||
public Vector3 position;
|
||||
public Quaternion rotation;
|
||||
public Vector3 scale;
|
||||
|
||||
public TransformDataStruct(Vector3 position, Quaternion rotation, Vector3 scale)
|
||||
{
|
||||
this.position = position;
|
||||
this.rotation = rotation;
|
||||
this.scale = scale;
|
||||
}
|
||||
|
||||
public TransformDataStruct(Vector3 position, Quaternion rotation) : this(position, rotation, Vector3.one)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public TransformDataStruct(Vector3 position) : this(position, Quaternion.identity)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public TransformDataStruct(Transform tr) : this(tr.position, tr.rotation, tr.lossyScale)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
11
Assets/Scripts/Utilities/TransformDataStruct.cs.meta
Normal file
11
Assets/Scripts/Utilities/TransformDataStruct.cs.meta
Normal file
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 5a676040a6b851344acb77794d43843a
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
Loading…
Add table
Reference in a new issue