Firstborn/Assets/Scripts/CharacterMenuSettings.cs
Schaken-Mods d53d39a1e0 Added settings in Character Menu
Added settings in the Character Creation menu. Removed the Zoom panel as now you can edit in fine detail.
2023-04-04 19:56:33 -05:00

54 lines
1.4 KiB
C#

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class CharacterMenuSettings : MonoBehaviour
{
public Transform Position1;
public Transform Position2;
public Transform Cam;
public Slider ADJZoom;
public Slider ADJXAxis;
public Slider ADJZAxis;
public Slider Volume;
// Start is called before the first frame update
void Start()
{
}
// Update is called once per frame
void Update()
{
}
public void UpdateCamPosition() {
Vector3 NewPosition = Cam.position;
NewPosition.z = ADJZAxis.value;
NewPosition.x = ADJXAxis.value;
NewPosition.y = ADJZoom.value;
this.transform.position = NewPosition;
// transform.rotation = Quaternion.Euler(70.0f, ADJRot.value, 0f);
// MapCompass.rotation = Quaternion.Euler(0f, 0f, ADJRot.value);
}
public void ToPosition1() {
Vector3 NewPosition = Position1.position;
ADJZAxis.value = NewPosition.z;
ADJXAxis.value = NewPosition.x;
ADJZoom.value = NewPosition.y;
this.transform.position = NewPosition;
}
public void ToPosition2() {
Vector3 NewPosition = Position2.position;
ADJZAxis.value = NewPosition.z;
ADJXAxis.value = NewPosition.x;
ADJZoom.value = NewPosition.y;
this.transform.position = NewPosition;
}
}