-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
No.2 SOLID GameState Fix References Solution (bad-way)
- Solution 1 Bad Way - Each get, set its own findObject, GetComp instead one Field Global for the class otherwise this was throwing Null and it was half-working
- Loading branch information
1 parent
981f5af
commit b573baf
Showing
65 changed files
with
1,773 additions
and
1,068 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,17 @@ | ||
using Core.Managers; | ||
using Interfaces.Core.Managers; | ||
using UnityEngine; | ||
|
||
namespace Abilities.Pickups | ||
{ | ||
public class BlockCoin : MonoBehaviour | ||
{ | ||
private LevelManager _levelManager; | ||
private ILevelManager _levelManager; | ||
|
||
private void Start() | ||
{ | ||
_levelManager = FindObjectOfType<LevelManager>(); | ||
_levelManager.AddCoin(transform.position + Vector3.down); | ||
_levelManager.GetPlayerPickUpAbilities.AddCoin(transform.position + Vector3.down); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.