private void Start() { availableTiles = new List <GameObject>(); playerControlsManager = FindObjectOfType <PlayerControlsManager>(); encounterManager = FindObjectOfType <EncounterManager>(); overWorldCanvas = FindObjectOfType <OverworldCanvas>().gameObject; testTrigger = FindObjectOfType <InFrontOfPlayerTrigger>(); playerController = FindObjectOfType <PlayerController>(); }
void Start() { movePoint.parent = null; animator = GetComponent <Animator>(); playerControlsManager = FindObjectOfType <PlayerControlsManager>(); //tileflipManager = FindObjectOfType<TileflipManager>(); corruptionSourceManager = FindObjectOfType <CorruptionSourceManager>(); testTrigger = GetComponentInChildren <InFrontOfPlayerTrigger>(); inFrontOfPlayerTrigger.position = new Vector2(transform.position.x, transform.position.y - 1 - playerTileOffset); dir = GetDirection(); SetInteractCoordinates(dir); currentDirection.y = -1f; Cursor.visible = false; Cursor.lockState = CursorLockMode.Locked; overWorldCanvas = FindObjectOfType <OverworldCanvas>().gameObject; playerOffsetVector = new Vector3(0.0f, 0.19f, 0.0f); }
private void Awake() { inFrontOfPlayerTrigger = FindObjectOfType <InFrontOfPlayerTrigger>(); overWorldCanvas = FindObjectOfType <OverworldCanvas>().gameObject; playerController = FindObjectOfType <PlayerController>(); }