void InitializeValues() { if (pm == null) { pm = GetComponent <PlayerNewLevelManager>(); } if (!pm.initialized_Attack) { contact.SetLayerMask(1 << LayerMask.NameToLayer("Player")); pm.initialized_Attack = true; } }
private void InitializeValues() { if (pm == null) { pm = GetComponent <PlayerNewLevelManager>(); } if (!pm.initialized_Aim) { pm.initialized_Aim = true; player = GetComponent <Player>(); } }
private void InitializeValues() { if (pm == null) { pm = GetComponent <PlayerNewLevelManager>(); } if (!pm.initialized_PlayerInteraction) { player = GetComponent <Player>(); pm.initialized_PlayerInteraction = true; players = GameObject.FindGameObjectsWithTag("Player"); } }
/// <summary> /// Start function but instead is called after a new scene loads /// </summary> private void InitializeValues() { if (pm == null) { pm = GetComponent <PlayerNewLevelManager>(); } if (!pm.initialized_Jump) { rb = GetComponent <Rigidbody2D>(); groundCheck = transform.Find("Ground Check"); pm.initialized_Jump = true; playerController = GetComponent <PlayerController>(); player = GetComponent <Player>(); } }
/// <summary> /// Start function but instead is called after a new scene loads /// </summary> private void InitializeValues() { if (pm == null) { pm = GetComponent <PlayerNewLevelManager>(); } if (!pm.initialized_Move) { wallCheck = transform.Find("Wall Check"); originalWallPos = wallCheck.localPosition.x; pm.initialized_Move = true; rb = GetComponent <Rigidbody2D>(); jumpController = GetComponent <JumpController>(); player = GetComponent <Player>(); } }