Added new assets

This commit is contained in:
Vladimir Koshevarov
2023-02-20 19:02:00 +02:00
parent 92a2aa49e5
commit 6388763d98
1501 changed files with 702875 additions and 637 deletions
@@ -0,0 +1,36 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
namespace SojaExiles
{
public class MouseLook : MonoBehaviour
{
public float mouseXSensitivity = 100f;
public Transform playerBody;
float xRotation = 0f;
// Start is called before the first frame update
void Start()
{
Cursor.lockState = CursorLockMode.Locked;
}
// Update is called once per frame
void Update()
{
float mouseX = Input.GetAxis("Mouse X") * mouseXSensitivity * Time.deltaTime;
float mouseY = Input.GetAxis("Mouse Y") * mouseXSensitivity * Time.deltaTime;
xRotation -= mouseY;
xRotation = Mathf.Clamp(xRotation, -90f, 90f);
transform.localRotation = Quaternion.Euler(xRotation, 0f, 0f);
playerBody.Rotate(Vector3.up * mouseX);
}
}
}
@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 478f19f2b564b5a459ccd72d2ea6afe1
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,37 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
namespace SojaExiles
{
public class PlayerMovement : MonoBehaviour
{
public CharacterController controller;
public float speed = 5f;
public float gravity = -15f;
Vector3 velocity;
bool isGrounded;
// Update is called once per frame
void Update()
{
float x = Input.GetAxis("Horizontal");
float z = Input.GetAxis("Vertical");
Vector3 move = transform.right * x + transform.forward * z;
controller.Move(move * speed * Time.deltaTime);
velocity.y += gravity * Time.deltaTime;
controller.Move(velocity * Time.deltaTime);
}
}
}
@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: c84cdf898723e1a4b9e4954eb5a76a33
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,62 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.SceneManagement;
namespace SojaExiles
{
public class SceneSwitchGen : MonoBehaviour
{
// Use this for initialization
void Start()
{
}
// Update is called once per frame
void Update()
{
if (Input.GetKeyDown(KeyCode.Alpha1))
{
SceneManager.LoadScene("Structure_01");
}
if (Input.GetKeyDown(KeyCode.Alpha2))
{
SceneManager.LoadScene("Structure_02");
}
if (Input.GetKeyDown(KeyCode.Alpha3))
{
SceneManager.LoadScene("Structure_03");
}
if (Input.GetKeyDown(KeyCode.Alpha4))
{
SceneManager.LoadScene("Structure_04");
}
if (Input.GetKeyDown(KeyCode.Alpha5))
{
SceneManager.LoadScene("Structure_05");
}
if (Input.GetKeyDown(KeyCode.Alpha6))
{
SceneManager.LoadScene("Structure_06");
}
if (Input.GetKeyDown(KeyCode.Alpha7))
{
SceneManager.LoadScene("Props Furniture Showcase");
}
if (Input.GetKeyDown(KeyCode.Escape))
{
Application.Quit();
}
}
}
}
@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: d4189f6b82d537b45b085891d0ec97f4
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant: