private TutorialManager tutorialmanager; //TutorialManager script void Awake() { //get script component of other GameObjects tutorialmanager = GameObject.Find("TutorialManager").GetComponent <TutorialManager>(); gameplaymanager = GameObject.Find("GameplayManager").GetComponent <GameplayManager>(); stageenvironment = GameObject.Find("GameplayManager").GetComponent <StageEnvironment>(); //get RespawnPoint, FallingPointLeft, and FallingPointRight position respawnPoint = spawnReferences[RESPAWNPOINT].transform; respawnRefLeft = spawnReferences[RESPAWNREF_LEFT].transform; //TODO adapt with the real implementation of platform respawnRefRight = spawnReferences[RESPAWNREF_RIGHT].transform; //TODO adapt with the real implementation of platform respawnRefLeftFlood = spawnReferences[RESPAWNREF_LEFT_FLOOD].transform; respawnRefRightFlood = spawnReferences[RESPAWNREF_RIGHT_FLOOD].transform; fallingPointLeft = spawnReferences[FALLINGPOINT_LEFT].transform; fallingPointRight = spawnReferences[FALLINGPOINT_RIGHT].transform; if (fallingPointLeft.position.y != fallingPointRight.position.y) { Debug.Log("fallingPointLeft.position.y != fallingPointRight.position.y, will use value from fallingPointLeft.position.y"); } //assign boundary values topY = respawnPoint.position.y; bottomY = fallingPointLeft.position.y; //since we assume that fallingPointLeft.position.y == fallingPointRight.position.y leftX = fallingPointLeft.position.x; rightX = fallingPointRight.position.x; respawnMinX = respawnRefLeft.position.x; respawnMaxX = respawnRefRight.position.x; }
void Awake() { tutorialmanager = GameObject.Find("TutorialManager").GetComponent <TutorialManager>(); env = GameObject.Find("GameplayManager").GetComponent <StageEnvironment>(); }
void Start() { stage = GameObject.Find("Terrain").GetComponent <StageEnvironment>(); HeroShooting = GameObject.Find("Player").transform.Find("Ship").GetComponent <Shooting>(); UpdateLaserState(); }