// Start is called before the first frame update void Start() { alpha = GetComponentInChildren <SpriteRenderer>(); alpha.transform.localScale = new Vector3(X_LENGTH, preYLength, 1); alpha.transform.position += new Vector3(-X_LENGTH / 2, 0, 0); alpha.color = startingColor; beamHitBox = GetComponentInChildren <BoxCollider2D>(); beamHitBox.enabled = false; StartCoroutine(Coalesce()); gameplayPause = FindObjectOfType <GameplayPause>(); }
// Start is called before the first frame update void Start() { alpha = GetComponentInChildren <SpriteRenderer>(); alpha.transform.parent.localScale = new Vector3(preXLength, Y_LENGTH, 1); alpha.color = startingColor; beamHitBox = GetComponentInChildren <BoxCollider2D>(); beamHitBox.enabled = false; StartCoroutine(Coalesce()); gameplayPause = FindObjectOfType <GameplayPause>(); fire.gameObject.SetActive(false); }
// Start is called before the first frame update void Start() { alpha = GetComponentInChildren <SpriteRenderer>(); transform.localScale = new Vector3(X_LENGTH, preYLength, 1); alpha.color = startingColor; beamHitBox = GetComponent <BoxCollider2D>(); beamHitBox.enabled = false; StartCoroutine(Coalesce()); transform.eulerAngles = new Vector3(transform.eulerAngles.x, transform.eulerAngles.y, Mathf.Rad2Deg * Mathf.Atan2(transform.position.y - player.position.y, transform.position.x - player.position.x)); gameplayPause = FindObjectOfType <GameplayPause>(); }
//GameObject button; // Start is called before the first frame update void Start() { gameplayPause = FindObjectOfType <GameplayPause>(); button.interactable = false; //SaveSystem.LoadGame(); if (StaticData.firstLoad.Equals(true)) { button.interactable = false; } else { buttonName = gameObject.name; switch (buttonName) { case "Shavo Button": if (StaticData.shavoUnlock) { button.interactable = true; } break; case "Daron Button": if (StaticData.daronUnlock) { button.interactable = true; } break; case "Serj Button": if (StaticData.serjUnlock) { button.interactable = true; } break; case "Level 2": if (StaticData.shavoUnlock) { button.interactable = true; } break; case "Level 3": if (StaticData.daronUnlock) { button.interactable = true; } break; case "Level 4": if (StaticData.serjUnlock) { button.interactable = true; } break; case "Song 2": if (StaticData.shavoUnlock) { button.interactable = true; } break; case "Song 3": if (StaticData.daronUnlock) { button.interactable = true; } break; case "Song 4": if (StaticData.serjUnlock) { button.interactable = true; } break; case "End_Scene": if (!StaticData.firstPlay) { button.interactable = true; } break; default: button.interactable = true; break; } } }