Merge branch 'main' of https://github.com/jonasbraus/Minecraft
This commit is contained in:
@@ -6,7 +6,7 @@ TextureImporter:
|
|||||||
serializedVersion: 11
|
serializedVersion: 11
|
||||||
mipmaps:
|
mipmaps:
|
||||||
mipMapMode: 0
|
mipMapMode: 0
|
||||||
enableMipMap: 0
|
enableMipMap: 1
|
||||||
sRGBTexture: 1
|
sRGBTexture: 1
|
||||||
linearTexture: 0
|
linearTexture: 0
|
||||||
fadeOut: 0
|
fadeOut: 0
|
||||||
@@ -32,7 +32,7 @@ TextureImporter:
|
|||||||
maxTextureSize: 2048
|
maxTextureSize: 2048
|
||||||
textureSettings:
|
textureSettings:
|
||||||
serializedVersion: 2
|
serializedVersion: 2
|
||||||
filterMode: 0
|
filterMode: 1
|
||||||
aniso: 1
|
aniso: 1
|
||||||
mipBias: 0
|
mipBias: 0
|
||||||
wrapU: 0
|
wrapU: 0
|
||||||
@@ -75,18 +75,6 @@ TextureImporter:
|
|||||||
overridden: 0
|
overridden: 0
|
||||||
androidETC2FallbackOverride: 0
|
androidETC2FallbackOverride: 0
|
||||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||||
- serializedVersion: 3
|
|
||||||
buildTarget: Standalone
|
|
||||||
maxTextureSize: 2048
|
|
||||||
resizeAlgorithm: 0
|
|
||||||
textureFormat: -1
|
|
||||||
textureCompression: 1
|
|
||||||
compressionQuality: 50
|
|
||||||
crunchedCompression: 0
|
|
||||||
allowsAlphaSplitting: 0
|
|
||||||
overridden: 0
|
|
||||||
androidETC2FallbackOverride: 0
|
|
||||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
|
||||||
spriteSheet:
|
spriteSheet:
|
||||||
serializedVersion: 2
|
serializedVersion: 2
|
||||||
sprites: []
|
sprites: []
|
||||||
|
|||||||
@@ -2135,7 +2135,7 @@ MonoBehaviour:
|
|||||||
textures: 090909090909
|
textures: 090909090909
|
||||||
transparent: 0
|
transparent: 0
|
||||||
- name: Dirt
|
- name: Dirt
|
||||||
textures: 010101010101
|
textures: 111111111111
|
||||||
transparent: 0
|
transparent: 0
|
||||||
- name: Grass
|
- name: Grass
|
||||||
textures: 020207010202
|
textures: 020207010202
|
||||||
@@ -2164,6 +2164,9 @@ MonoBehaviour:
|
|||||||
- name: Cobblestone
|
- name: Cobblestone
|
||||||
textures: 080808080808
|
textures: 080808080808
|
||||||
transparent: 0
|
transparent: 0
|
||||||
|
- name: Coal
|
||||||
|
textures: 111111111111
|
||||||
|
transparent: 0
|
||||||
--- !u!1 &965289403
|
--- !u!1 &965289403
|
||||||
GameObject:
|
GameObject:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ using System;
|
|||||||
using System.Collections;
|
using System.Collections;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
using UnityEngine.UI;
|
||||||
|
|
||||||
public class Player : MonoBehaviour
|
public class Player : MonoBehaviour
|
||||||
{
|
{
|
||||||
@@ -14,6 +15,7 @@ public class Player : MonoBehaviour
|
|||||||
[SerializeField] private float jumpForce;
|
[SerializeField] private float jumpForce;
|
||||||
[SerializeField] private World world;
|
[SerializeField] private World world;
|
||||||
[SerializeField] private Hotbar hotbar;
|
[SerializeField] private Hotbar hotbar;
|
||||||
|
[SerializeField] private Text positionText;
|
||||||
private float playerWidth = 0.15f;
|
private float playerWidth = 0.15f;
|
||||||
private float playerOffsetWidth = 0.1f;
|
private float playerOffsetWidth = 0.1f;
|
||||||
private float horizontal;
|
private float horizontal;
|
||||||
@@ -81,6 +83,7 @@ public class Player : MonoBehaviour
|
|||||||
if (lastPosition.x != position.x || lastPosition.y != position.y || lastPosition.z != position.z)
|
if (lastPosition.x != position.x || lastPosition.y != position.y || lastPosition.z != position.z)
|
||||||
{
|
{
|
||||||
client.SendPositionUpdate(transform.position);
|
client.SendPositionUpdate(transform.position);
|
||||||
|
positionText.text = position.ToString();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (rotation.w != lastRotation.w || rotation.x != lastRotation.x || rotation.y != lastRotation.y ||
|
if (rotation.w != lastRotation.w || rotation.x != lastRotation.x || rotation.y != lastRotation.y ||
|
||||||
@@ -101,6 +104,8 @@ public class Player : MonoBehaviour
|
|||||||
mouseX = Input.GetAxis("Mouse X");
|
mouseX = Input.GetAxis("Mouse X");
|
||||||
mouseY = Input.GetAxis("Mouse Y");
|
mouseY = Input.GetAxis("Mouse Y");
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//Sprinting
|
//Sprinting
|
||||||
if (Input.GetKeyDown(KeyCode.LeftShift) || Input.GetButtonDown("Left Stick Button"))
|
if (Input.GetKeyDown(KeyCode.LeftShift) || Input.GetButtonDown("Left Stick Button"))
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -202,6 +202,24 @@ public class World : MonoBehaviour
|
|||||||
//underground pass
|
//underground pass
|
||||||
if ((int)positionInWorld.y < height)
|
if ((int)positionInWorld.y < height)
|
||||||
{
|
{
|
||||||
|
//dirt
|
||||||
|
if((int)positionInWorld.y > 6 && (int)positionInWorld.y < height - 3)
|
||||||
|
{
|
||||||
|
if (noise.Get3DPerlin(positionInWorld, 3, 0.28f, 0.65f))
|
||||||
|
{
|
||||||
|
return 2;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//coal
|
||||||
|
if((int)positionInWorld.y > 6 && (int)positionInWorld.y < height - 3)
|
||||||
|
{
|
||||||
|
if (noise.Get3DPerlin(positionInWorld, 5, 0.28f, 0.65f))
|
||||||
|
{
|
||||||
|
return 2;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//caves
|
//caves
|
||||||
if((int)positionInWorld.y > 6 && (int)positionInWorld.y < height - 8)
|
if((int)positionInWorld.y > 6 && (int)positionInWorld.y < height - 8)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,7 +0,0 @@
|
|||||||
fileFormatVersion: 2
|
|
||||||
guid: 940041af630d8d944ac3b74467aa4ae7
|
|
||||||
DefaultImporter:
|
|
||||||
externalObjects: {}
|
|
||||||
userData:
|
|
||||||
assetBundleName:
|
|
||||||
assetBundleVariant:
|
|
||||||
Reference in New Issue
Block a user