ground material change
This commit is contained in:
80
Assets/Resources/Materials/Black.mat
Normal file
80
Assets/Resources/Materials/Black.mat
Normal file
@@ -0,0 +1,80 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!21 &2100000
|
||||
Material:
|
||||
serializedVersion: 8
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: Black
|
||||
m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0}
|
||||
m_ValidKeywords: []
|
||||
m_InvalidKeywords: []
|
||||
m_LightmapFlags: 4
|
||||
m_EnableInstancingVariants: 0
|
||||
m_DoubleSidedGI: 0
|
||||
m_CustomRenderQueue: -1
|
||||
stringTagMap: {}
|
||||
disabledShaderPasses: []
|
||||
m_SavedProperties:
|
||||
serializedVersion: 3
|
||||
m_TexEnvs:
|
||||
- _BumpMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailAlbedoMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailMask:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailNormalMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _EmissionMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MainTex:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MetallicGlossMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _OcclusionMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _ParallaxMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_Ints: []
|
||||
m_Floats:
|
||||
- _BumpScale: 1
|
||||
- _Cutoff: 0.5
|
||||
- _DetailNormalMapScale: 1
|
||||
- _DstBlend: 0
|
||||
- _GlossMapScale: 1
|
||||
- _Glossiness: 0.239
|
||||
- _GlossyReflections: 1
|
||||
- _Metallic: 0
|
||||
- _Mode: 0
|
||||
- _OcclusionStrength: 1
|
||||
- _Parallax: 0.02
|
||||
- _SmoothnessTextureChannel: 0
|
||||
- _SpecularHighlights: 1
|
||||
- _SrcBlend: 1
|
||||
- _UVSec: 0
|
||||
- _ZWrite: 1
|
||||
m_Colors:
|
||||
- _Color: {r: 0, g: 0, b: 0, a: 1}
|
||||
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
|
||||
m_BuildTextureStacks: []
|
||||
8
Assets/Resources/Materials/Black.mat.meta
Normal file
8
Assets/Resources/Materials/Black.mat.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: cec427bc0abfad54ca8fe959fd2360cf
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 2100000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -3276,6 +3276,12 @@ MonoBehaviour:
|
||||
m_EditorClassIdentifier:
|
||||
loadFrom: []
|
||||
sideObjects: []
|
||||
materials:
|
||||
- {fileID: 2100000, guid: 97cabee3711df3b4b944878d6d30edda, type: 2}
|
||||
- {fileID: 2100000, guid: 197ee10712c66054cb2f88781c8d94f4, type: 2}
|
||||
- {fileID: 2100000, guid: 1afa0118e3d81e54598c9479c5e31eb9, type: 2}
|
||||
- {fileID: 2100000, guid: cec427bc0abfad54ca8fe959fd2360cf, type: 2}
|
||||
materialIndex: 0
|
||||
groundMoveSpeed: 10
|
||||
--- !u!4 &1201779183
|
||||
Transform:
|
||||
@@ -4777,8 +4783,8 @@ Transform:
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1895677325}
|
||||
m_LocalRotation: {x: 0.045581307, y: -0.70516795, z: 0.045520626, w: 0.7061079}
|
||||
m_LocalPosition: {x: 2.546471, y: 2.9687777, z: -22.464832}
|
||||
m_LocalRotation: {x: 0.0010953943, y: 0.9979507, z: -0.06145683, w: 0.017787272}
|
||||
m_LocalPosition: {x: -0.15911984, y: 2.9687777, z: -12.856641}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
|
||||
@@ -7,6 +7,8 @@ public class GroundController : MonoBehaviour
|
||||
private GameObject[] ground;
|
||||
public GameObject[] loadFrom;
|
||||
public GameObject[] sideObjects;
|
||||
public Material[] materials;
|
||||
public int materialIndex = 0;
|
||||
public float groundMoveSpeed = 10f;
|
||||
|
||||
//private CollectibleSpawner cs;
|
||||
@@ -40,6 +42,25 @@ public class GroundController : MonoBehaviour
|
||||
//uj ground letrehozas
|
||||
if(ground[ground.Length-1].transform.position.z <= 120){
|
||||
CreateNewGround();
|
||||
|
||||
ground = GameObject.FindGameObjectsWithTag("Ground");
|
||||
|
||||
for(int i = 0; i < ground.Length; i++){
|
||||
/*foreach (GameObject child in ground[i].transform){
|
||||
if (child.name == "Lane1" || child.name == "Lane2" || child.name == "Lane3"){
|
||||
Debug.Log(child.name + " " + transform.gameObject.name);
|
||||
}
|
||||
}*/
|
||||
Transform[] lanes = new Transform[3];
|
||||
lanes[0] = ground[i].transform.Find("Lane1");
|
||||
lanes[1] = ground[i].transform.Find("Lane2");
|
||||
lanes[2] = ground[i].transform.Find("Lane3");
|
||||
|
||||
foreach(var item in lanes){
|
||||
item.GetComponent<MeshRenderer>().material = materials[materialIndex];
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
//ellenorzi hogy torolheto e az object || mar nem szukseges mert van egy trigger box
|
||||
@@ -58,6 +79,10 @@ public class GroundController : MonoBehaviour
|
||||
return arr;
|
||||
}
|
||||
|
||||
public void changeMaterialIndex(){
|
||||
|
||||
}
|
||||
|
||||
private bool CheckGroundToDestroy(GameObject toCheck){
|
||||
//z = -80 -nal lehet torolni
|
||||
if(toCheck.transform.position.z <= -80){
|
||||
@@ -83,7 +108,7 @@ public class GroundController : MonoBehaviour
|
||||
|
||||
private void CreateNewGround(){
|
||||
int random = UnityEngine.Random.Range(0, loadFrom.Length);
|
||||
//egy modullal elobb tolt be, annak az iranyanak megfeleloen, +80 a ket modull hossza
|
||||
//egy modullal elobb tolt be, annak az iranyanak megfeleloen, +80 a ket modul hossza
|
||||
Instantiate(loadFrom[random], new Vector3(0,0, ground[ground.Length-1].transform.position.z + 40), ground[ground.Length-1].transform.rotation);
|
||||
}
|
||||
}
|
||||
@@ -119,7 +119,9 @@ public class PlayerController : MonoBehaviour
|
||||
}
|
||||
|
||||
public void jump(){
|
||||
Debug.Log("jumped");
|
||||
if(rb.transform.position.y <= 0.16f)
|
||||
rb.AddForce(new Vector3(0, jumpforce, 0)); //ugras
|
||||
|
||||
Debug.Log("jumped");
|
||||
}
|
||||
}
|
||||
@@ -43,8 +43,8 @@ MonoBehaviour:
|
||||
y: 0
|
||||
width: 415
|
||||
height: 590
|
||||
m_MinSize: {x: 200, y: 200}
|
||||
m_MaxSize: {x: 4000, y: 4000}
|
||||
m_MinSize: {x: 202, y: 221}
|
||||
m_MaxSize: {x: 4002, y: 4021}
|
||||
m_ActualView: {fileID: 13}
|
||||
m_Panes:
|
||||
- {fileID: 13}
|
||||
@@ -74,7 +74,7 @@ MonoBehaviour:
|
||||
m_MinSize: {x: 400, y: 200}
|
||||
m_MaxSize: {x: 32384, y: 16192}
|
||||
vertical: 0
|
||||
controlID: 112
|
||||
controlID: 27
|
||||
--- !u!114 &4
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 52
|
||||
@@ -94,8 +94,8 @@ MonoBehaviour:
|
||||
y: 0
|
||||
width: 537
|
||||
height: 947
|
||||
m_MinSize: {x: 275, y: 50}
|
||||
m_MaxSize: {x: 4000, y: 4000}
|
||||
m_MinSize: {x: 276, y: 71}
|
||||
m_MaxSize: {x: 4001, y: 4021}
|
||||
m_ActualView: {fileID: 15}
|
||||
m_Panes:
|
||||
- {fileID: 15}
|
||||
@@ -249,7 +249,7 @@ MonoBehaviour:
|
||||
m_MinSize: {x: 300, y: 200}
|
||||
m_MaxSize: {x: 24288, y: 16192}
|
||||
vertical: 1
|
||||
controlID: 62
|
||||
controlID: 71
|
||||
--- !u!114 &11
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 52
|
||||
@@ -275,7 +275,7 @@ MonoBehaviour:
|
||||
m_MinSize: {x: 300, y: 100}
|
||||
m_MaxSize: {x: 24288, y: 8096}
|
||||
vertical: 0
|
||||
controlID: 63
|
||||
controlID: 72
|
||||
--- !u!114 &12
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 52
|
||||
@@ -402,22 +402,22 @@ MonoBehaviour:
|
||||
m_SkipHidden: 0
|
||||
m_SearchArea: 1
|
||||
m_Folders:
|
||||
- Assets/Scripts
|
||||
- Assets/Resources/Materials
|
||||
m_Globs: []
|
||||
m_OriginalText:
|
||||
m_ViewMode: 1
|
||||
m_StartGridSize: 53
|
||||
m_LastFolders:
|
||||
- Assets/Scripts
|
||||
- Assets/Resources/Materials
|
||||
m_LastFoldersGridSize: 53
|
||||
m_LastProjectPath: E:\dev\zarodolgozat\ColorBall
|
||||
m_LockTracker:
|
||||
m_IsLocked: 0
|
||||
m_FolderTreeState:
|
||||
scrollPos: {x: 0, y: 0}
|
||||
m_SelectedIDs: 6c6c0000
|
||||
m_LastClickedID: 27756
|
||||
m_ExpandedIDs: 00000000566c0000
|
||||
m_SelectedIDs: 985f0000
|
||||
m_LastClickedID: 24472
|
||||
m_ExpandedIDs: 00000000865f00009a5f0000
|
||||
m_RenameOverlay:
|
||||
m_UserAcceptedRename: 0
|
||||
m_Name:
|
||||
@@ -445,7 +445,7 @@ MonoBehaviour:
|
||||
scrollPos: {x: 0, y: 0}
|
||||
m_SelectedIDs:
|
||||
m_LastClickedID: 0
|
||||
m_ExpandedIDs: 00000000566c0000
|
||||
m_ExpandedIDs: 00000000865f0000
|
||||
m_RenameOverlay:
|
||||
m_UserAcceptedRename: 0
|
||||
m_Name:
|
||||
@@ -575,7 +575,7 @@ MonoBehaviour:
|
||||
scrollPos: {x: 0, y: 0}
|
||||
m_SelectedIDs:
|
||||
m_LastClickedID: 0
|
||||
m_ExpandedIDs: 3a8dffffa08dffff4a8fffff7c97ffff8a9bfffff09bffff069cffff38a4fffffea5ffff64a6ffffeaa7ffff1cb0ffffbcb6ffff26b7ffff3cb7ffff6cbfffffe2c9ffff4acaffff60caffff90d2ffff46e6ffffaae6ffff3ae8ffff6af0ffff16fbffffde83000098b0000094e00000eee10000
|
||||
m_ExpandedIDs: 18fbffff2c4f0000
|
||||
m_RenameOverlay:
|
||||
m_UserAcceptedRename: 0
|
||||
m_Name:
|
||||
@@ -857,9 +857,9 @@ MonoBehaviour:
|
||||
m_PlayAudio: 0
|
||||
m_AudioPlay: 0
|
||||
m_Position:
|
||||
m_Target: {x: 0, y: 0, z: -2.800003}
|
||||
m_Target: {x: -9.881584, y: 2.6289597, z: 95.31944}
|
||||
speed: 2
|
||||
m_Value: {x: 0, y: 0, z: -2.800003}
|
||||
m_Value: {x: -9.881584, y: 2.6289597, z: 95.31944}
|
||||
m_RenderMode: 0
|
||||
m_CameraMode:
|
||||
drawMode: 0
|
||||
@@ -906,13 +906,13 @@ MonoBehaviour:
|
||||
m_GridAxis: 1
|
||||
m_gridOpacity: 0.5
|
||||
m_Rotation:
|
||||
m_Target: {x: -0.08717229, y: 0.89959055, z: -0.21045254, w: -0.3726226}
|
||||
m_Target: {x: -0.18727255, y: 0.45572704, z: -0.09871261, w: -0.8645814}
|
||||
speed: 2
|
||||
m_Value: {x: -0.08717229, y: 0.89959055, z: -0.21045254, w: -0.3726226}
|
||||
m_Value: {x: -0.18727224, y: 0.45572627, z: -0.098712444, w: -0.86458}
|
||||
m_Size:
|
||||
m_Target: 16.91902
|
||||
m_Target: 42.03924
|
||||
speed: 2
|
||||
m_Value: 16.91902
|
||||
m_Value: 42.03924
|
||||
m_Ortho:
|
||||
m_Target: 0
|
||||
speed: 2
|
||||
@@ -958,9 +958,9 @@ MonoBehaviour:
|
||||
m_Pos:
|
||||
serializedVersion: 2
|
||||
x: 0
|
||||
y: 661
|
||||
y: 663
|
||||
width: 1382
|
||||
height: 338
|
||||
height: 336
|
||||
m_ViewDataDictionary: {fileID: 0}
|
||||
m_OverlayCanvas:
|
||||
m_LastAppliedPresetName: Default
|
||||
|
||||
Reference in New Issue
Block a user