Skip to content

Commit

Permalink
24 hours no sleep, brain empty and i want to die. I dont remember wha…
Browse files Browse the repository at this point in the history
…t i did in this commit
  • Loading branch information
Peksterix committed Jan 27, 2022
1 parent 26c28ae commit 552fc2e
Show file tree
Hide file tree
Showing 2,061 changed files with 251,631 additions and 64 deletions.
149 changes: 136 additions & 13 deletions NYP x Trident/Assets/KingOfTheHill/Images/Square.controller
Original file line number Diff line number Diff line change
@@ -1,5 +1,33 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1101 &-8714871080756546507
AnimatorStateTransition:
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name:
m_Conditions:
- m_ConditionMode: 2
m_ConditionEvent: IsJumping
m_EventTreshold: 0
- m_ConditionMode: 4
m_ConditionEvent: Moving
m_EventTreshold: 0.1
m_DstStateMachine: {fileID: 0}
m_DstState: {fileID: -7550524545864101840}
m_Solo: 0
m_Mute: 0
m_IsExit: 0
serializedVersion: 3
m_TransitionDuration: 0.25
m_TransitionOffset: 0
m_ExitTime: 0.5833333
m_HasExitTime: 0
m_HasFixedDuration: 1
m_InterruptionSource: 0
m_OrderedInterruption: 1
m_CanTransitionToSelf: 1
--- !u!1102 &-7692821877533123207
AnimatorState:
serializedVersion: 6
Expand All @@ -11,8 +39,8 @@ AnimatorState:
m_Speed: 1
m_CycleOffset: 0
m_Transitions:
- {fileID: 1963768737311114890}
- {fileID: 8460245069099627293}
- {fileID: -8714871080756546507}
- {fileID: -2219169513576451563}
m_StateMachineBehaviours: []
m_Position: {x: 50, y: 50, z: 0}
m_IKOnFeet: 0
Expand Down Expand Up @@ -40,7 +68,6 @@ AnimatorState:
m_CycleOffset: 0
m_Transitions:
- {fileID: -1295315281630907497}
- {fileID: -6759740449079010913}
m_StateMachineBehaviours: []
m_Position: {x: 50, y: 50, z: 0}
m_IKOnFeet: 0
Expand All @@ -56,6 +83,31 @@ AnimatorState:
m_MirrorParameter:
m_CycleOffsetParameter:
m_TimeParameter:
--- !u!1101 &-6852050447612768760
AnimatorStateTransition:
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name:
m_Conditions:
- m_ConditionMode: 1
m_ConditionEvent: IsJumping
m_EventTreshold: 0
m_DstStateMachine: {fileID: 0}
m_DstState: {fileID: -7692821877533123207}
m_Solo: 0
m_Mute: 0
m_IsExit: 0
serializedVersion: 3
m_TransitionDuration: 0
m_TransitionOffset: 0
m_ExitTime: 0.75
m_HasExitTime: 0
m_HasFixedDuration: 1
m_InterruptionSource: 0
m_OrderedInterruption: 1
m_CanTransitionToSelf: 0
--- !u!1101 &-6759740449079010913
AnimatorStateTransition:
m_ObjectHideFlags: 1
Expand Down Expand Up @@ -90,7 +142,6 @@ AnimatorState:
m_CycleOffset: 0
m_Transitions:
- {fileID: -4401310922064095415}
- {fileID: -5349728381450818944}
m_StateMachineBehaviours: []
m_Position: {x: 50, y: 50, z: 0}
m_IKOnFeet: 0
Expand Down Expand Up @@ -120,16 +171,17 @@ AnimatorStateMachine:
m_Position: {x: 250, y: 110, z: 0}
- serializedVersion: 1
m_State: {fileID: -6737564024548936378}
m_Position: {x: 510, y: -10, z: 0}
m_Position: {x: 270, y: -80, z: 0}
- serializedVersion: 1
m_State: {fileID: -7692821877533123207}
m_Position: {x: 520, y: 190, z: 0}
m_Position: {x: 520, y: 50, z: 0}
m_ChildStateMachines: []
m_AnyStateTransitions: []
m_AnyStateTransitions:
- {fileID: -6852050447612768760}
m_EntryTransitions: []
m_StateMachineTransitions: {}
m_StateMachineBehaviours: []
m_AnyStatePosition: {x: 50, y: 20, z: 0}
m_AnyStatePosition: {x: 540, y: 290, z: 0}
m_EntryPosition: {x: 50, y: 120, z: 0}
m_ExitPosition: {x: 800, y: 120, z: 0}
m_ParentStateMachinePosition: {x: 800, y: 20, z: 0}
Expand Down Expand Up @@ -163,7 +215,10 @@ AnimatorStateTransition:
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name:
m_Conditions: []
m_Conditions:
- m_ConditionMode: 4
m_ConditionEvent: Moving
m_EventTreshold: 0.1
m_DstStateMachine: {fileID: 0}
m_DstState: {fileID: -7550524545864101840}
m_Solo: 0
Expand All @@ -173,7 +228,35 @@ AnimatorStateTransition:
m_TransitionDuration: 0.25
m_TransitionOffset: 0
m_ExitTime: 0.06250006
m_HasExitTime: 1
m_HasExitTime: 0
m_HasFixedDuration: 1
m_InterruptionSource: 0
m_OrderedInterruption: 1
m_CanTransitionToSelf: 1
--- !u!1101 &-2219169513576451563
AnimatorStateTransition:
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name:
m_Conditions:
- m_ConditionMode: 3
m_ConditionEvent: Moving
m_EventTreshold: 0.1
- m_ConditionMode: 2
m_ConditionEvent: IsJumping
m_EventTreshold: 0
m_DstStateMachine: {fileID: 0}
m_DstState: {fileID: -6737564024548936378}
m_Solo: 0
m_Mute: 0
m_IsExit: 0
serializedVersion: 3
m_TransitionDuration: 0.25
m_TransitionOffset: 0
m_ExitTime: 0.5833333
m_HasExitTime: 0
m_HasFixedDuration: 1
m_InterruptionSource: 0
m_OrderedInterruption: 1
Expand All @@ -185,7 +268,10 @@ AnimatorStateTransition:
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name:
m_Conditions: []
m_Conditions:
- m_ConditionMode: 3
m_ConditionEvent: Moving
m_EventTreshold: 0.1
m_DstStateMachine: {fileID: 0}
m_DstState: {fileID: -6737564024548936378}
m_Solo: 0
Expand All @@ -195,7 +281,7 @@ AnimatorStateTransition:
m_TransitionDuration: 0.25
m_TransitionOffset: 0
m_ExitTime: 0.7169812
m_HasExitTime: 1
m_HasExitTime: 0
m_HasFixedDuration: 1
m_InterruptionSource: 0
m_OrderedInterruption: 1
Expand All @@ -208,7 +294,25 @@ AnimatorController:
m_PrefabAsset: {fileID: 0}
m_Name: Square
serializedVersion: 5
m_AnimatorParameters: []
m_AnimatorParameters:
- m_Name: IsJumping
m_Type: 4
m_DefaultFloat: 0
m_DefaultInt: 0
m_DefaultBool: 0
m_Controller: {fileID: 0}
- m_Name: Moving
m_Type: 1
m_DefaultFloat: 0
m_DefaultInt: 0
m_DefaultBool: 0
m_Controller: {fileID: 0}
- m_Name: Idle
m_Type: 1
m_DefaultFloat: 0
m_DefaultInt: 0
m_DefaultBool: 0
m_Controller: {fileID: 0}
m_AnimatorLayers:
- serializedVersion: 5
m_Name: Base Layer
Expand All @@ -222,6 +326,25 @@ AnimatorController:
m_IKPass: 0
m_SyncedLayerAffectsTiming: 0
m_Controller: {fileID: 9100000}
--- !u!1107 &200951183252471934
AnimatorStateMachine:
serializedVersion: 6
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: New Layer
m_ChildStates: []
m_ChildStateMachines: []
m_AnyStateTransitions: []
m_EntryTransitions: []
m_StateMachineTransitions: {}
m_StateMachineBehaviours: []
m_AnyStatePosition: {x: 50, y: 20, z: 0}
m_EntryPosition: {x: 50, y: 120, z: 0}
m_ExitPosition: {x: 800, y: 120, z: 0}
m_ParentStateMachinePosition: {x: 800, y: 20, z: 0}
m_DefaultState: {fileID: 0}
--- !u!1101 &1963768737311114890
AnimatorStateTransition:
m_ObjectHideFlags: 1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4960,7 +4960,7 @@ MonoBehaviour:
syncMode: 0
syncInterval: 0
clientAuthority: 0
animator: {fileID: 0}
animator: {fileID: 5310802855070382102}
--- !u!114 &2386865176939091796
MonoBehaviour:
m_ObjectHideFlags: 0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ RectTransform:
m_GameObject: {fileID: 1605726672701829340}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_LocalScale: {x: -1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 5263398328867538621}
m_RootOrder: 0
Expand Down Expand Up @@ -143,7 +143,7 @@ MonoBehaviour:
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_Sprite: {fileID: 21300000, guid: b8b7e165ffe3db04ab6b2f860ab858bd, type: 3}
m_Sprite: {fileID: 21300000, guid: b2c104b6190d2ec47bf3bdddf66531ac, type: 3}
m_Type: 0
m_PreserveAspect: 0
m_FillCenter: 1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ public class KOTHPlayerController : NetworkBehaviour
public GameObject powerupImage;
public GameObject waterbombPrefab;

float playerScoreIFrame;

public Animator animator;

private void OnValidate()
{
if (characterController == null)
Expand All @@ -41,6 +45,9 @@ public override void OnStartLocalPlayer()
//transform.rotation = Quaternion.Euler(0, 90, 0);
hasWaterbomb = false;
//characterController.detectCollisions = false;
playerScoreIFrame = 2f;

animator = GetComponent<Animator>();
}

// Update is called once per frame
Expand Down Expand Up @@ -69,6 +76,8 @@ void Update()
if (Input.GetButtonDown("Jump") && groundedPlayer)
playerVelocity.y += Mathf.Sqrt(jumpHeight * -3.0f * gravity);

animator.SetBool("IsJumping", groundedPlayer);

if (Input.GetButtonDown("Fire1"))
CmdShoot();
else if (Input.GetButtonUp("Fire1"))
Expand All @@ -90,6 +99,9 @@ void Update()
else
powerupImage.SetActive(false);

playerScoreIFrame -= Time.deltaTime * 1;

animator.SetFloat("IsMoving", Mathf.Abs(Horizontal));
}

private void FixedUpdate()
Expand Down Expand Up @@ -190,10 +202,12 @@ private void OnTriggerEnter(Collider other)

private void OnTriggerStay(Collider other)
{
if (other.gameObject.CompareTag("Platforms") && isLocalPlayer)
if (other.gameObject.CompareTag("Platforms") && isLocalPlayer && playerScoreIFrame < 0)
{
if (other.gameObject.GetComponentInParent<MoveablePlatformController>().isHighestPlatform)
GetComponent<PlayerScore>().playerScore++;

playerScoreIFrame = 2f;
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,11 @@ void Update()
transform.GetChild(0).GetComponentInChildren<ParticleSystem>().Play();
else
transform.GetChild(0).GetComponentInChildren<ParticleSystem>().Stop();

//platformLifetime -= Time.deltaTime * 1;

//if (platformLifetime <= 0)
// NetworkServer.Destroy(this.gameObject);
}

private void FixedUpdate()
Expand All @@ -43,6 +48,8 @@ private void FixedUpdate()
platform.position += new Vector3(0f, speed * Time.deltaTime, 0f);
}



private void OnCollisionEnter(Collision collision)
{

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,17 +100,23 @@ void SetNewHighestPlatform()
for (int i = 2; i < platformParent.transform.childCount; ++i)
{
platform = platformParent.transform.GetChild(i).GetChild(0).gameObject;
if (platform.transform.position.y > CurrentHighestPlatform.transform.GetChild(0).position.y)
if (platform.transform.position.y > CurrentHighestPlatform.transform.GetChild(0).position.y && platform != null)
{
if (platform == null)
return;

CurrentHighestPlatform = platform;
}
else
{
if (platform == null)
return;

platform.GetComponentInParent<MoveablePlatformController>().isHighestPlatform = false;
}
}

if (CurrentHighestPlatform.CompareTag("Platforms"))
if (CurrentHighestPlatform.CompareTag("Platforms") && CurrentHighestPlatform != null)
CurrentHighestPlatform.GetComponentInParent<MoveablePlatformController>().isHighestPlatform = true;
else
return;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,13 @@
public class PlayerScore : NetworkBehaviour
{
[Header("Player Details")]
[SyncVar(hook = nameof(SyncScore))]
public int playerScore;
[SyncVar(hook = nameof(SyncScore))] public int playerScore;
[SyncVar]
public string playerName;

[Header("UI References")]
[SerializeField]
GameObject playerScorePanel;
[SerializeField]
Transform playerScoreContainer;
[SerializeField] GameObject playerScorePanel;
[SerializeField] Transform playerScoreContainer;

GameObject newPlayerScorePanel;

Expand Down
Binary file added NYP x Trident/Assets/Main Menu/Images/idle.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 552fc2e

Please sign in to comment.