// Use this for initialization void Start() { audioManager = FindObjectOfType <AudioManager>(); checkPointSystem = GameObject.FindGameObjectWithTag("CheckPointSystem").GetComponent <CheckPointSystem>(); animator = GetComponent <Animator>(); akuAku = GameObject.FindGameObjectWithTag("AkuAku").GetComponent <AkuAku>(); lifeDisplayer = lifeCanvas.GetComponent <Displayer>(); wumpaDisplayer = wumpaCanvas.GetComponent <Displayer>(); spawnPoint = transform.position; //get the position spawn if (checkPointSystem.checkpointsUnlocked.Count > 0) { lifeDisplayer.DisplayInfo(checkPointSystem.lifeAmount); Vector3 position = checkPointSystem.checkpointsUnlocked.Last(); position.y += 0.35F; transform.position = position; } else { transform.position = spawnPoint; TeleportStart(); } }
public override void Init() { base.Init(); akuAku = GameObject.FindGameObjectWithTag("AkuAku").GetComponent <AkuAku>(); boxName = "akuaku"; }
void Start() { player = GetComponent <Player>(); animator = GetComponent <Animator>(); akuAku = GameObject.FindGameObjectWithTag("AkuAku").GetComponent <AkuAku>(); }