side object update, portal spawn rules #10
@@ -1,8 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b96955730a74a745b80bbb65782ca1f8
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Binary file not shown.
Binary file not shown.
BIN
Assets/Resources/Models/World Objects/haz1tukor.blend
Normal file
BIN
Assets/Resources/Models/World Objects/haz1tukor.blend
Normal file
Binary file not shown.
@@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: fd275518d3aad0536b1b8b19df0306ad
|
||||
guid: 5e814191f087bc54b9b4c463419d91a5
|
||||
ModelImporter:
|
||||
serializedVersion: 21300
|
||||
internalIDToNameTable: []
|
||||
@@ -42,14 +42,14 @@ ModelImporter:
|
||||
sortHierarchyByName: 1
|
||||
importVisibility: 1
|
||||
importBlendShapes: 1
|
||||
importCameras: 1
|
||||
importLights: 1
|
||||
importCameras: 0
|
||||
importLights: 0
|
||||
nodeNameCollisionStrategy: 1
|
||||
fileIdsGeneration: 2
|
||||
swapUVChannels: 0
|
||||
generateSecondaryUV: 0
|
||||
useFileUnits: 1
|
||||
keepQuads: 0
|
||||
keepQuads: 1
|
||||
weldVertices: 1
|
||||
bakeAxisConversion: 0
|
||||
preserveHierarchy: 0
|
||||
@@ -66,7 +66,7 @@ ModelImporter:
|
||||
secondaryUVMinLightmapResolution: 40
|
||||
secondaryUVMinObjectScale: 1
|
||||
secondaryUVPackMargin: 4
|
||||
useFileScale: 1
|
||||
useFileScale: 0
|
||||
tangentSpace:
|
||||
normalSmoothAngle: 60
|
||||
normalImportMode: 0
|
||||
BIN
Assets/Resources/Models/World Objects/haz2tukor.blend
Normal file
BIN
Assets/Resources/Models/World Objects/haz2tukor.blend
Normal file
Binary file not shown.
106
Assets/Resources/Models/World Objects/haz2tukor.blend.meta
Normal file
106
Assets/Resources/Models/World Objects/haz2tukor.blend.meta
Normal file
@@ -0,0 +1,106 @@
|
||||
fileFormatVersion: 2
|
||||
guid: dde0de1a5a0540349960213281bdc74e
|
||||
ModelImporter:
|
||||
serializedVersion: 21300
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
materials:
|
||||
materialImportMode: 2
|
||||
materialName: 0
|
||||
materialSearch: 1
|
||||
materialLocation: 1
|
||||
animations:
|
||||
legacyGenerateAnimations: 4
|
||||
bakeSimulation: 0
|
||||
resampleCurves: 1
|
||||
optimizeGameObjects: 0
|
||||
removeConstantScaleCurves: 1
|
||||
motionNodeName:
|
||||
rigImportErrors:
|
||||
rigImportWarnings:
|
||||
animationImportErrors:
|
||||
animationImportWarnings:
|
||||
animationRetargetingWarnings:
|
||||
animationDoRetargetingWarnings: 0
|
||||
importAnimatedCustomProperties: 0
|
||||
importConstraints: 0
|
||||
animationCompression: 1
|
||||
animationRotationError: 0.5
|
||||
animationPositionError: 0.5
|
||||
animationScaleError: 0.5
|
||||
animationWrapMode: 0
|
||||
extraExposedTransformPaths: []
|
||||
extraUserProperties: []
|
||||
clipAnimations: []
|
||||
isReadable: 0
|
||||
meshes:
|
||||
lODScreenPercentages: []
|
||||
globalScale: 1
|
||||
meshCompression: 0
|
||||
addColliders: 0
|
||||
useSRGBMaterialColor: 1
|
||||
sortHierarchyByName: 1
|
||||
importVisibility: 1
|
||||
importBlendShapes: 1
|
||||
importCameras: 0
|
||||
importLights: 0
|
||||
nodeNameCollisionStrategy: 1
|
||||
fileIdsGeneration: 2
|
||||
swapUVChannels: 0
|
||||
generateSecondaryUV: 0
|
||||
useFileUnits: 1
|
||||
keepQuads: 1
|
||||
weldVertices: 0
|
||||
bakeAxisConversion: 0
|
||||
preserveHierarchy: 0
|
||||
skinWeightsMode: 0
|
||||
maxBonesPerVertex: 4
|
||||
minBoneWeight: 0.001
|
||||
optimizeBones: 1
|
||||
meshOptimizationFlags: -1
|
||||
indexFormat: 0
|
||||
secondaryUVAngleDistortion: 8
|
||||
secondaryUVAreaDistortion: 15.000001
|
||||
secondaryUVHardAngle: 88
|
||||
secondaryUVMarginMethod: 1
|
||||
secondaryUVMinLightmapResolution: 40
|
||||
secondaryUVMinObjectScale: 1
|
||||
secondaryUVPackMargin: 4
|
||||
useFileScale: 1
|
||||
tangentSpace:
|
||||
normalSmoothAngle: 60
|
||||
normalImportMode: 0
|
||||
tangentImportMode: 3
|
||||
normalCalculationMode: 4
|
||||
legacyComputeAllNormalsFromSmoothingGroupsWhenMeshHasBlendShapes: 0
|
||||
blendShapeNormalImportMode: 0
|
||||
normalSmoothingSource: 0
|
||||
referencedClips: []
|
||||
importAnimation: 1
|
||||
humanDescription:
|
||||
serializedVersion: 3
|
||||
human: []
|
||||
skeleton: []
|
||||
armTwist: 0.5
|
||||
foreArmTwist: 0.5
|
||||
upperLegTwist: 0.5
|
||||
legTwist: 0.5
|
||||
armStretch: 0.05
|
||||
legStretch: 0.05
|
||||
feetSpacing: 0
|
||||
globalScale: 1
|
||||
rootMotionBoneName:
|
||||
hasTranslationDoF: 0
|
||||
hasExtraRoot: 0
|
||||
skeletonHasParents: 1
|
||||
lastHumanDescriptionAvatarSource: {instanceID: 0}
|
||||
autoGenerateAvatarMappingIfUnspecified: 1
|
||||
animationType: 2
|
||||
humanoidOversampling: 1
|
||||
avatarSetup: 0
|
||||
addHumanoidExtraRootOnlyWhenUsingAvatar: 1
|
||||
remapMaterialsIfMaterialImportModeIsNone: 0
|
||||
additionalBone: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
BIN
Assets/Resources/Models/World Objects/haz3tukor.blend
Normal file
BIN
Assets/Resources/Models/World Objects/haz3tukor.blend
Normal file
Binary file not shown.
@@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 345137c8b40553842bf05ead1dab812e
|
||||
guid: 54c04c01263edae47831b700835b66de
|
||||
ModelImporter:
|
||||
serializedVersion: 21300
|
||||
internalIDToNameTable: []
|
||||
5796
Assets/Resources/Prefabs/WorldObjects/World1/haz1tukor.prefab
Normal file
5796
Assets/Resources/Prefabs/WorldObjects/World1/haz1tukor.prefab
Normal file
File diff suppressed because it is too large
Load Diff
@@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 801674bb4f54353d3966591ac2876a92
|
||||
guid: 5822b88e98887c34383505b33c58d6da
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 8500f6075c56d47809b2a1e2dfb10d39
|
||||
guid: f8302c5b02615834ab22b119484415c4
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1444,6 +1444,79 @@ MonoBehaviour:
|
||||
m_Calls: []
|
||||
m_LegacyBlendHint: 0
|
||||
m_ComponentOwner: {fileID: 838686756}
|
||||
--- !u!1001 &611445596
|
||||
PrefabInstance:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 2
|
||||
m_Modification:
|
||||
m_TransformParent: {fileID: 0}
|
||||
m_Modifications:
|
||||
- target: {fileID: 1455135685323931089, guid: 5822b88e98887c34383505b33c58d6da, type: 3}
|
||||
propertyPath: m_Name
|
||||
value: haz1tukor
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1554951571398515104, guid: 5822b88e98887c34383505b33c58d6da, type: 3}
|
||||
propertyPath: m_Enabled
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2268264582307538795, guid: 5822b88e98887c34383505b33c58d6da, type: 3}
|
||||
propertyPath: m_RootOrder
|
||||
value: 15
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2268264582307538795, guid: 5822b88e98887c34383505b33c58d6da, type: 3}
|
||||
propertyPath: m_LocalPosition.x
|
||||
value: -9
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2268264582307538795, guid: 5822b88e98887c34383505b33c58d6da, type: 3}
|
||||
propertyPath: m_LocalPosition.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2268264582307538795, guid: 5822b88e98887c34383505b33c58d6da, type: 3}
|
||||
propertyPath: m_LocalPosition.z
|
||||
value: -10
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2268264582307538795, guid: 5822b88e98887c34383505b33c58d6da, type: 3}
|
||||
propertyPath: m_LocalRotation.w
|
||||
value: 0.7071068
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2268264582307538795, guid: 5822b88e98887c34383505b33c58d6da, type: 3}
|
||||
propertyPath: m_LocalRotation.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2268264582307538795, guid: 5822b88e98887c34383505b33c58d6da, type: 3}
|
||||
propertyPath: m_LocalRotation.y
|
||||
value: 0.7071068
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2268264582307538795, guid: 5822b88e98887c34383505b33c58d6da, type: 3}
|
||||
propertyPath: m_LocalRotation.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2268264582307538795, guid: 5822b88e98887c34383505b33c58d6da, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2268264582307538795, guid: 5822b88e98887c34383505b33c58d6da, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.y
|
||||
value: 90
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2268264582307538795, guid: 5822b88e98887c34383505b33c58d6da, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6266817390742658039, guid: 5822b88e98887c34383505b33c58d6da, type: 3}
|
||||
propertyPath: m_RootOrder
|
||||
value: 15
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6266817390742658039, guid: 5822b88e98887c34383505b33c58d6da, type: 3}
|
||||
propertyPath: m_LocalPosition.z
|
||||
value: -11
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6266817390742658039, guid: 5822b88e98887c34383505b33c58d6da, type: 3}
|
||||
propertyPath: m_AnchoredPosition.x
|
||||
value: -9
|
||||
objectReference: {fileID: 0}
|
||||
m_RemovedComponents: []
|
||||
m_SourcePrefab: {fileID: 100100000, guid: 5822b88e98887c34383505b33c58d6da, type: 3}
|
||||
--- !u!1 &644899047
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -1762,6 +1835,79 @@ CanvasRenderer:
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 645543792}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!1001 &687902612
|
||||
PrefabInstance:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 2
|
||||
m_Modification:
|
||||
m_TransformParent: {fileID: 0}
|
||||
m_Modifications:
|
||||
- target: {fileID: 1455135685323931089, guid: 5822b88e98887c34383505b33c58d6da, type: 3}
|
||||
propertyPath: m_Name
|
||||
value: haz1tukor (1)
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1554951571398515104, guid: 5822b88e98887c34383505b33c58d6da, type: 3}
|
||||
propertyPath: m_Enabled
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2268264582307538795, guid: 5822b88e98887c34383505b33c58d6da, type: 3}
|
||||
propertyPath: m_RootOrder
|
||||
value: 16
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2268264582307538795, guid: 5822b88e98887c34383505b33c58d6da, type: 3}
|
||||
propertyPath: m_LocalPosition.x
|
||||
value: 9
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2268264582307538795, guid: 5822b88e98887c34383505b33c58d6da, type: 3}
|
||||
propertyPath: m_LocalPosition.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2268264582307538795, guid: 5822b88e98887c34383505b33c58d6da, type: 3}
|
||||
propertyPath: m_LocalPosition.z
|
||||
value: -10
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2268264582307538795, guid: 5822b88e98887c34383505b33c58d6da, type: 3}
|
||||
propertyPath: m_LocalRotation.w
|
||||
value: 0.7071068
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2268264582307538795, guid: 5822b88e98887c34383505b33c58d6da, type: 3}
|
||||
propertyPath: m_LocalRotation.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2268264582307538795, guid: 5822b88e98887c34383505b33c58d6da, type: 3}
|
||||
propertyPath: m_LocalRotation.y
|
||||
value: 0.7071068
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2268264582307538795, guid: 5822b88e98887c34383505b33c58d6da, type: 3}
|
||||
propertyPath: m_LocalRotation.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2268264582307538795, guid: 5822b88e98887c34383505b33c58d6da, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2268264582307538795, guid: 5822b88e98887c34383505b33c58d6da, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.y
|
||||
value: 90
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2268264582307538795, guid: 5822b88e98887c34383505b33c58d6da, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6266817390742658039, guid: 5822b88e98887c34383505b33c58d6da, type: 3}
|
||||
propertyPath: m_RootOrder
|
||||
value: 16
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6266817390742658039, guid: 5822b88e98887c34383505b33c58d6da, type: 3}
|
||||
propertyPath: m_LocalPosition.z
|
||||
value: -11
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6266817390742658039, guid: 5822b88e98887c34383505b33c58d6da, type: 3}
|
||||
propertyPath: m_AnchoredPosition.x
|
||||
value: 9
|
||||
objectReference: {fileID: 0}
|
||||
m_RemovedComponents: []
|
||||
m_SourcePrefab: {fileID: 100100000, guid: 5822b88e98887c34383505b33c58d6da, type: 3}
|
||||
--- !u!1 &702512601
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -3304,6 +3450,9 @@ MonoBehaviour:
|
||||
- {fileID: 2100000, guid: cec427bc0abfad54ca8fe959fd2360cf, type: 2}
|
||||
materialIndex: 0
|
||||
groundMoveSpeed: 10
|
||||
portalModul: {fileID: 6679310150688957571, guid: 922c9d3ed72c7904e92daec040e7e8ff, type: 3}
|
||||
groundCounter: 0
|
||||
portalSpawnNumber: 15
|
||||
--- !u!4 &1201779183
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -3379,7 +3528,7 @@ MonoBehaviour:
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
State: 0
|
||||
playButton: {fileID: 645543792}
|
||||
playGomb: {fileID: 645543792}
|
||||
garazs: {fileID: 1876191122}
|
||||
homeGomb: {fileID: 1543880549}
|
||||
settingsGomb: {fileID: 644899047}
|
||||
@@ -3725,7 +3874,7 @@ Transform:
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1513686735}
|
||||
m_LocalRotation: {x: 0.22590086, y: 0.0030496388, z: -0.00070720055, w: 0.9741453}
|
||||
m_LocalRotation: {x: 0.22590086, y: 0.0030496013, z: -0.0007071918, w: 0.9741453}
|
||||
m_LocalPosition: {x: -0.28647116, y: 6.2664723, z: 2.6748314}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
@@ -4971,7 +5120,7 @@ Light:
|
||||
serializedVersion: 10
|
||||
m_Type: 1
|
||||
m_Shape: 0
|
||||
m_Color: {r: 1, g: 0.95686275, b: 0.8392157, a: 1}
|
||||
m_Color: {r: 1, g: 0.9759549, b: 0.9103774, a: 1}
|
||||
m_Intensity: 1
|
||||
m_Range: 10
|
||||
m_SpotAngle: 30
|
||||
@@ -5011,7 +5160,7 @@ Light:
|
||||
serializedVersion: 2
|
||||
m_Bits: 4294967295
|
||||
m_RenderingLayerMask: 1
|
||||
m_Lightmapping: 2
|
||||
m_Lightmapping: 4
|
||||
m_LightShadowCasterMode: 0
|
||||
m_AreaSize: {x: 1, y: 1}
|
||||
m_BounceIntensity: 1
|
||||
@@ -5030,7 +5179,7 @@ Transform:
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1980041874}
|
||||
m_LocalRotation: {x: 0.40821788, y: -0.23456968, z: 0.10938163, w: 0.8754261}
|
||||
m_LocalPosition: {x: 0, y: 3, z: 0}
|
||||
m_LocalPosition: {x: 21.7, y: 18.5, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
|
||||
@@ -12,6 +12,10 @@ public class GroundController : MonoBehaviour
|
||||
public int materialIndex = 0;
|
||||
public float groundMoveSpeed = 10f;
|
||||
private Vector3 lastSideObjectPos = new Vector3(0, 0, 0);
|
||||
[SerializeField] GameObject portalModul;
|
||||
|
||||
[SerializeField] private int groundCounter = 0;
|
||||
[SerializeField] private int portalSpawnNumber = 15; //ennyi modulonkent spawnoljon portalt
|
||||
|
||||
//private CollectibleSpawner cs;
|
||||
|
||||
@@ -51,8 +55,7 @@ public class GroundController : MonoBehaviour
|
||||
OrderArrayByZ(sideObjectsSpawned);
|
||||
|
||||
for (int i = 0; i < ground.Length; i++)
|
||||
{ //ground objecteket mozgatja
|
||||
//ground[i].transform.position = ground[i].transform.position + new Vector3(0,0, -groundMoveSpeed * Time.deltaTime);
|
||||
{ //ground objecteket mozgatja
|
||||
Move(ground[i]);
|
||||
}
|
||||
|
||||
@@ -62,26 +65,26 @@ public class GroundController : MonoBehaviour
|
||||
Move(sideObjectsSpawned[i]);
|
||||
}
|
||||
|
||||
if (sideObjectsSpawned[sideObjectsSpawned.Length - 1].transform.position.z < 145)
|
||||
{
|
||||
CreateNewSideObjects(false);
|
||||
CreateNewSideObjects(true);
|
||||
}
|
||||
|
||||
//uj ground letrehozas
|
||||
if (ground[ground.Length - 1].transform.position.z <= 120)
|
||||
{
|
||||
CreateNewGround();
|
||||
|
||||
for (int k = 0; k < 3; k++)
|
||||
{
|
||||
CreateNewSideObjects(false);
|
||||
CreateNewSideObjects(true);
|
||||
if(groundCounter == portalSpawnNumber){
|
||||
CreateNewGround(true);
|
||||
groundCounter = 0; //ne menjen a vegtelensegig a counter
|
||||
}else{
|
||||
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");
|
||||
@@ -94,13 +97,6 @@ public class GroundController : MonoBehaviour
|
||||
}
|
||||
}
|
||||
|
||||
//ellenorzi hogy torolheto e az object || mar nem szukseges mert van egy trigger box
|
||||
/*foreach (var item in ground){
|
||||
if(CheckGroundToDestroy(item)){
|
||||
Destroy(item);
|
||||
}
|
||||
}*/
|
||||
|
||||
//cs.SpawnCoin();
|
||||
}
|
||||
|
||||
@@ -119,41 +115,46 @@ public class GroundController : MonoBehaviour
|
||||
{
|
||||
if (item.transform.position.x < 0 && isLeftSide)
|
||||
{
|
||||
side.Add(item); //ball oldal
|
||||
side.Add(item); //bal oldal
|
||||
}
|
||||
else
|
||||
else if (item.transform.position.x > 0 && !isLeftSide)
|
||||
{
|
||||
side.Add(item); //jobb oldal
|
||||
}
|
||||
}
|
||||
|
||||
int random = UnityEngine.Random.Range(0, sideObjects.Length);
|
||||
random = 0; //csak debug
|
||||
int random = UnityEngine.Random.Range(0, sideObjects.Length); //random sorsolasa a modulhoz
|
||||
//random = 0; //csak debug
|
||||
|
||||
GameObject inst = sideObjects[random];
|
||||
GameObject inst = sideObjects[random]; //random modul object eltarolas
|
||||
|
||||
//remake to get width
|
||||
Vector3 offset = new Vector3(0, 0, 10f);
|
||||
Vector3 offset = new Vector3(0, 0, 0);
|
||||
|
||||
if (sideObjectsSpawned.Length > 0)
|
||||
if (side.Count > 0)
|
||||
{
|
||||
if (sideObjectsSpawned[sideObjectsSpawned.Length - 1].gameObject.name.Contains("haz1")) //haz1Clone
|
||||
offset = new Vector3(0, 0, 10f); //TODO adjust
|
||||
else if (sideObjectsSpawned[sideObjectsSpawned.Length - 1].gameObject.name.Contains("haz2"))
|
||||
if (side[side.Count - 1].gameObject.name.Contains("haz1")) //haz1Clone
|
||||
offset = new Vector3(0, 0, 15f); //TODO adjust
|
||||
else if (side[side.Count - 1].gameObject.name.Contains("haz2"))
|
||||
offset = new Vector3(0, 0, 20f); //TODO adjust
|
||||
}
|
||||
//
|
||||
|
||||
Vector3 pos = new Vector3(9f, 0, 0);
|
||||
Vector3 pos = new Vector3(9f, -5f, -10f);
|
||||
Quaternion rotation = inst.transform.rotation;
|
||||
|
||||
if (sideObjectsSpawned.Length > 0)
|
||||
pos = sideObjectsSpawned[sideObjectsSpawned.Length - 1].transform.position + offset;
|
||||
if (side.Count > 0)
|
||||
//pos = sideObjectsSpawned[sideObjectsSpawned.Length - 1].transform.position + offset;
|
||||
pos = side[side.Count - 1].transform.position + offset;
|
||||
else
|
||||
pos = pos + offset;
|
||||
|
||||
if (isLeftSide) pos.x = -pos.x;
|
||||
|
||||
Instantiate(inst, pos, inst.transform.rotation);
|
||||
if (isLeftSide && pos.x > 0) //x negativ hogy a bal oldalra keruljon
|
||||
pos.x = -pos.x;
|
||||
|
||||
|
||||
Instantiate(inst, pos, rotation);
|
||||
|
||||
sideObjectsSpawned = GameObject.FindGameObjectsWithTag("SideObject");
|
||||
OrderArrayByZ(sideObjectsSpawned);
|
||||
@@ -164,10 +165,11 @@ public class GroundController : MonoBehaviour
|
||||
int materialteszt;
|
||||
bool teszteljtovabb = true;
|
||||
|
||||
while (teszteljtovabb == true)
|
||||
while (teszteljtovabb)
|
||||
{
|
||||
materialteszt = UnityEngine.Random.Range(0, materials.Length);
|
||||
Debug.Log(materialteszt);
|
||||
|
||||
if (materialteszt == materialIndex)
|
||||
{
|
||||
|
||||
@@ -211,10 +213,20 @@ public class GroundController : MonoBehaviour
|
||||
}
|
||||
}
|
||||
|
||||
private void CreateNewGround()
|
||||
private void CreateNewGround(bool portalModulSpawn = false)
|
||||
{
|
||||
int random = UnityEngine.Random.Range(0, loadFrom.Length);
|
||||
|
||||
GameObject inst;
|
||||
|
||||
if(!portalModulSpawn)
|
||||
inst = loadFrom[random];
|
||||
else
|
||||
inst = portalModul;
|
||||
|
||||
|
||||
//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);
|
||||
Instantiate(inst, new Vector3(0, 0, ground[ground.Length - 1].transform.position.z + 40), ground[ground.Length - 1].transform.rotation);
|
||||
groundCounter++;
|
||||
}
|
||||
}
|
||||
@@ -13,12 +13,9 @@ public class DatabaseData : MonoBehaviour
|
||||
public PlayerList players; //jatekos adatok
|
||||
public HighScoreTableDataContainer htdc; //itt van a tomb
|
||||
public HighScoreTable hst; //high score table ui
|
||||
|
||||
private StreamWriter writer;
|
||||
public string jsondata; //json szoveg
|
||||
|
||||
private CoinCounter coinc;
|
||||
|
||||
public string jsondata; //json szoveg
|
||||
public ulong coins = 0;
|
||||
|
||||
|
||||
@@ -47,7 +44,7 @@ public class DatabaseData : MonoBehaviour
|
||||
url = "nodejs.dszcbaross.edu.hu:" + PORT.ToString();
|
||||
}*/
|
||||
|
||||
url = "nodejs.dszcbaross.edu.hu:" + PORT.ToString();
|
||||
//url = "nodejs.dszcbaross.edu.hu:" + PORT.ToString();
|
||||
Debug.Log("<color=pink>url: </color>" + url);
|
||||
}
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@ public class jatekmanager : MonoBehaviour
|
||||
public static event Action<GameState> OnGameStateChanged;
|
||||
|
||||
//gameobjectek,gombok,scriptek
|
||||
public GameObject playButton;
|
||||
public GameObject playGomb;
|
||||
public GameObject garazs;
|
||||
public GameObject homeGomb;
|
||||
public GameObject settingsGomb;
|
||||
@@ -96,6 +96,7 @@ public class jatekmanager : MonoBehaviour
|
||||
homeGomb.SetActive(true);
|
||||
settingsGomb.SetActive(true);
|
||||
shopGomb.SetActive(true);
|
||||
|
||||
goLeftButton.SetActive(false);
|
||||
jumpButton.SetActive(false);
|
||||
goRightButton.SetActive(false);
|
||||
@@ -107,6 +108,7 @@ public class jatekmanager : MonoBehaviour
|
||||
{
|
||||
//deactivate buttons
|
||||
StartCoroutine(TimerHome());
|
||||
playGomb.SetActive(true);
|
||||
GetComponent<GroundController>().enabled = false;
|
||||
GetComponent<PlayerController>().enabled = false;
|
||||
goLeftButton.SetActive(false);
|
||||
@@ -120,32 +122,36 @@ public class jatekmanager : MonoBehaviour
|
||||
IEnumerator TimerHome()
|
||||
{
|
||||
yield return new WaitForSecondsRealtime(2);
|
||||
playButton.SetActive(true);
|
||||
|
||||
|
||||
}
|
||||
|
||||
public void ChangeToSettings()
|
||||
{
|
||||
UpdateGameState(GameState.Settings);
|
||||
playGomb.SetActive(false);
|
||||
}
|
||||
|
||||
private async void HandleSettings()
|
||||
{
|
||||
playButton.SetActive(false);
|
||||
playGomb.SetActive(false);
|
||||
goLeftButton.SetActive(false);
|
||||
jumpButton.SetActive(false);
|
||||
goRightButton.SetActive(false);
|
||||
scoreText.gameObject.SetActive(false);
|
||||
timerText.gameObject.SetActive(false);
|
||||
playGomb.SetActive(false);
|
||||
}
|
||||
|
||||
public void ChangeToShop()
|
||||
{
|
||||
UpdateGameState(GameState.Shop);
|
||||
|
||||
}
|
||||
|
||||
private async void HandleShop()
|
||||
{
|
||||
playButton.SetActive(false);
|
||||
playGomb.SetActive(false);
|
||||
goLeftButton.SetActive(false);
|
||||
jumpButton.SetActive(false);
|
||||
goRightButton.SetActive(false);
|
||||
@@ -158,31 +164,37 @@ public class jatekmanager : MonoBehaviour
|
||||
homeGomb.SetActive(false);
|
||||
settingsGomb.SetActive(false);
|
||||
shopGomb.SetActive(false);
|
||||
playButton.SetActive(false);
|
||||
playGomb.SetActive(false);
|
||||
UpdateGameState(GameState.Game);
|
||||
|
||||
}
|
||||
|
||||
IEnumerator TimerGame()
|
||||
{
|
||||
yield return new WaitForSecondsRealtime(1);
|
||||
garazs.SetActive(false);
|
||||
|
||||
|
||||
}
|
||||
|
||||
private async void HandleGame()
|
||||
{
|
||||
StartCoroutine(TimerGame());
|
||||
|
||||
|
||||
|
||||
GetComponent <GroundController> ().enabled = true;
|
||||
GetComponent <PlayerController>().enabled = true;
|
||||
|
||||
|
||||
goLeftButton.SetActive(true);
|
||||
jumpButton.SetActive(true);
|
||||
goRightButton.SetActive(true);
|
||||
scoreText.gameObject.SetActive(true);
|
||||
timerText.gameObject.SetActive(true);
|
||||
playButton.SetActive(false);
|
||||
timerText.gameObject.SetActive(true);;
|
||||
|
||||
|
||||
timer.playTime.Start();
|
||||
|
||||
}
|
||||
|
||||
public void ChangeToMeghaltal()
|
||||
@@ -205,7 +217,7 @@ public class jatekmanager : MonoBehaviour
|
||||
SceneUIManager.LoadScene(1); //HighScore scene
|
||||
|
||||
|
||||
/*playButton.SetActive(false);
|
||||
/*
|
||||
homeGomb.SetActive(true);
|
||||
GetComponent<GroundController>().enabled = false;
|
||||
GetComponent<PlayerController>().enabled = false;
|
||||
|
||||
@@ -13,7 +13,9 @@ public class portal : MonoBehaviour
|
||||
|
||||
private void OnTriggerEnter(Collider other)
|
||||
{
|
||||
gc.changeMaterialIndex();
|
||||
if(other.gameObject.tag.Equals("Player")){
|
||||
gc.changeMaterialIndex();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user