Commit 397100a6 authored by Marcel Kuehn's avatar Marcel Kuehn
Browse files

Challanger updated

parent d49a20da
......@@ -11,6 +11,23 @@ Prefab:
m_SourcePrefab: {fileID: 0}
m_RootGameObject: {fileID: 1473882291736946}
m_IsPrefabAsset: 1
--- !u!1 &1417612902657568
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
serializedVersion: 6
m_Component:
- component: {fileID: 4138369072203684}
- component: {fileID: 212487020654207486}
- component: {fileID: 95725269812116476}
m_Layer: 0
m_Name: ChallengerModus
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!1 &1473882291736946
GameObject:
m_ObjectHideFlags: 0
......@@ -27,19 +44,51 @@ GameObject:
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &4143147008631634
--- !u!4 &4138369072203684
Transform:
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1473882291736946}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 3.6737773, y: 1.7891176, z: -0.048828125}
m_GameObject: {fileID: 1417612902657568}
m_LocalRotation: {x: 0, y: 0, z: 0.7071068, w: 0.7071068}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 4143147008631634}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 90}
--- !u!4 &4143147008631634
Transform:
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1473882291736946}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: -100, y: -100, z: 0}
m_LocalScale: {x: 0.5, y: 0.5, z: 0.5}
m_Children:
- {fileID: 4138369072203684}
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!95 &95725269812116476
Animator:
serializedVersion: 3
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1417612902657568}
m_Enabled: 1
m_Avatar: {fileID: 0}
m_Controller: {fileID: 9100000, guid: 2e0f638e1d17dd34db46b8c2e3738fea, type: 2}
m_CullingMode: 0
m_UpdateMode: 0
m_ApplyRootMotion: 0
m_LinearVelocityBlending: 0
m_WarningMessage:
m_HasTransformHierarchy: 1
m_AllowConstantClipSamplingOptimization: 1
m_KeepAnimatorControllerStateOnDisable: 0
--- !u!114 &114764353408195872
MonoBehaviour:
m_ObjectHideFlags: 1
......@@ -52,3 +101,49 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
waitTime: 0
--- !u!212 &212487020654207486
SpriteRenderer:
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1417612902657568}
m_Enabled: 1
m_CastShadows: 0
m_ReceiveShadows: 0
m_DynamicOccludee: 1
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
m_RenderingLayerMask: 4294967295
m_Materials:
- {fileID: 10754, guid: 0000000000000000f000000000000000, type: 0}
m_StaticBatchInfo:
firstSubMesh: 0
subMeshCount: 0
m_StaticBatchRoot: {fileID: 0}
m_ProbeAnchor: {fileID: 0}
m_LightProbeVolumeOverride: {fileID: 0}
m_ScaleInLightmap: 1
m_PreserveUVs: 0
m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0
m_StitchLightmapSeams: 0
m_SelectedEditorRenderState: 0
m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 1483109359
m_SortingLayer: 4
m_SortingOrder: 0
m_Sprite: {fileID: 21300000, guid: d3d269b56963fe24394615804bf332db, type: 3}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_FlipX: 0
m_FlipY: 0
m_DrawMode: 0
m_Size: {x: 2.56, y: 2.56}
m_AdaptiveModeThreshold: 0.5
m_SpriteTileMode: 0
m_WasSpriteAssigned: 1
m_MaskInteraction: 0
m_SpriteSortPoint: 0
......@@ -114,8 +114,8 @@ Transform:
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1320188170728490}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: -5}
m_LocalRotation: {x: 0, y: 0, z: 1, w: 0}
m_LocalPosition: {x: 10.441403, y: 5.677433, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children:
- {fileID: 4515523674784162}
......@@ -123,7 +123,7 @@ Transform:
- {fileID: 4060432582790156}
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 180}
--- !u!4 &4266236885723778
Transform:
m_ObjectHideFlags: 1
......
......@@ -6,22 +6,28 @@ public class ChallagerController : MonoBehaviour {
public float waitTime;
private readonly Queue<Vector3> oldPosition = new Queue<Vector3>();
private readonly Queue<Quaternion> oldRotation = new Queue<Quaternion>();
private void Start() {
pa = GetComponent<PlayerActor>();
pa=FindObjectOfType<PlayerActor>();
waitTime = 2.0f;
}
private void FixedUpdate() {
if (waitTime <= 0f) {
oldPosition.Enqueue(pa.transform.position);
oldRotation.Enqueue(pa.transform.rotation);
transform.position = oldPosition.Dequeue();
transform.rotation = oldRotation.Dequeue();
}
else {
waitTime -= Time.deltaTime;
oldPosition.Enqueue(pa.transform.position);
oldRotation.Enqueue(pa.transform.rotation);
}
}
}
......@@ -19,7 +19,7 @@ public class GameManager : SingletonBehaviour<GameManager> {
public bool IsChallengerModeEnabled { get; set; }
private void Awake() {
IsChallengerModeEnabled = false;
IsChallengerModeEnabled = true;
IsInLevel = false;
HighestLevel = 1;
......
......@@ -20,4 +20,15 @@ public class MainMenuController : MonoBehaviour {
public void ResetProgress() {
GameManager.Instance.ResetProgress();
}
public void SetChallengerOn()
{
GameManager.Instance.IsChallengerModeEnabled = true;
}
public void SetChallengerOff()
{
GameManager.Instance.IsChallengerModeEnabled = false;
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment