_
This commit is contained in:
parent
19319ee0e9
commit
b1dad755b6
@ -421,6 +421,7 @@ GameObject:
|
||||
- component: {fileID: 109409229}
|
||||
- component: {fileID: 109409228}
|
||||
- component: {fileID: 109409227}
|
||||
- component: {fileID: 109409230}
|
||||
m_Layer: 3
|
||||
m_Name: Floor
|
||||
m_TagString: Untagged
|
||||
@ -435,7 +436,7 @@ Transform:
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 109409225}
|
||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 5.57, y: -2, z: 0.70835644}
|
||||
m_LocalScale: {x: 30, y: 2, z: 1}
|
||||
m_Children: []
|
||||
@ -540,6 +541,22 @@ SpriteRenderer:
|
||||
m_WasSpriteAssigned: 1
|
||||
m_MaskInteraction: 0
|
||||
m_SpriteSortPoint: 0
|
||||
--- !u!114 &109409230
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 109409225}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: fe64d67f1c40b18489ec353998cffd48, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
right_rotation: 1
|
||||
flipping: 0
|
||||
flip_angle: 0
|
||||
speed: 6
|
||||
--- !u!1 &230892769
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
|
@ -334,7 +334,7 @@ Transform:
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 109409225}
|
||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 37.8, y: -2, z: 0.70835644}
|
||||
m_LocalScale: {x: 30, y: 2, z: 1}
|
||||
m_Children: []
|
||||
|
35
Assets/Scripts/RotateAroundSelfAxis.cs
Normal file
35
Assets/Scripts/RotateAroundSelfAxis.cs
Normal file
@ -0,0 +1,35 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
public class RotateAroundSelfAxis : MonoBehaviour
|
||||
{
|
||||
public bool right_rotation = true;
|
||||
public bool flipping = false;
|
||||
[Range(0, (float)Math.PI * 2)] [SerializeField] public float flip_angle = 0;
|
||||
[Range(0, 60)] [SerializeField] public float speed = 1;
|
||||
|
||||
Quaternion rotation;
|
||||
|
||||
// Start is called before the first frame update
|
||||
void Start()
|
||||
{
|
||||
rotation = transform.rotation;
|
||||
}
|
||||
|
||||
// Update is called once per frame
|
||||
void Update()
|
||||
{
|
||||
rotation = transform.rotation;
|
||||
|
||||
if(right_rotation) {
|
||||
rotation[2] -= speed * Time.deltaTime;
|
||||
} else {
|
||||
rotation[2] += speed * Time.deltaTime;
|
||||
}
|
||||
Debug.Log(speed * Time.deltaTime);
|
||||
|
||||
transform.rotation = rotation;
|
||||
}
|
||||
}
|
11
Assets/Scripts/RotateAroundSelfAxis.cs.meta
Normal file
11
Assets/Scripts/RotateAroundSelfAxis.cs.meta
Normal file
@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: fe64d67f1c40b18489ec353998cffd48
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -12,25 +12,25 @@ EditorUserSettings:
|
||||
value: 22424703114646680e0b0227036c7919181e0b22623d28393930
|
||||
flags: 0
|
||||
RecentlyUsedScenePath-2:
|
||||
value: 22424703114646680e0b0227036c73150012147b623d28393930
|
||||
value: 22424703114646680e0b0227036c6b0502180a232d2468252320092a
|
||||
flags: 0
|
||||
RecentlyUsedScenePath-3:
|
||||
value: 22424703114646680e0b0227036c731500121478623d28393930
|
||||
value: 22424703114646680e0b0227036c73150012147c623d28393930
|
||||
flags: 0
|
||||
RecentlyUsedScenePath-4:
|
||||
value: 22424703114646680e0b0227036c731500121479623d28393930
|
||||
value: 22424703114646680e0b0227036c731500121478623d28393930
|
||||
flags: 0
|
||||
RecentlyUsedScenePath-5:
|
||||
value: 22424703114646680e0b0227036c6b0502180a232d2468252320092a
|
||||
value: 22424703114646680e0b0227036c73150012147f623d28393930
|
||||
flags: 0
|
||||
RecentlyUsedScenePath-6:
|
||||
value: 22424703114646680e0b0227036c73150012147e623d28393930
|
||||
flags: 0
|
||||
RecentlyUsedScenePath-7:
|
||||
value: 22424703114646680e0b0227036c73150012147c623d28393930
|
||||
value: 22424703114646680e0b0227036c731500121479623d28393930
|
||||
flags: 0
|
||||
RecentlyUsedScenePath-8:
|
||||
value: 22424703114646680e0b0227036c73150012147f623d28393930
|
||||
value: 22424703114646680e0b0227036c73150012147b623d28393930
|
||||
flags: 0
|
||||
UnityRemoteCompression:
|
||||
value: 337f73
|
||||
|
Loading…
Reference in New Issue
Block a user