void Awake() { player = GameObject.FindGameObjectWithTag("Player"); playerMove = player.GetComponent <PlayerMoveInput>(); // Init pool of still bubbles bubblesPool1 = new List <GameObject>(); for (int i = 0; i < bubblesNum; i++) { bubblesPool1.Add(Instantiate(bubblesPrefab1, Vector3.zero, Quaternion.identity)); bubblesPool1[i].SetActive(false); } bubblesPool2 = new List <GameObject>(); for (int i = 0; i < bubblesNum; i++) { bubblesPool2.Add(Instantiate(bubblesPrefab2, Vector3.zero, Quaternion.identity)); bubblesPool2[i].SetActive(false); } // Init pool of moving bubbles mBubblesPool1 = new List <GameObject>(); for (int i = 0; i < bubblesNum; i++) { mBubblesPool1.Add(Instantiate(mBubblesPrefab1, Vector3.zero, Quaternion.identity)); mBubblesPool1[i].SetActive(false); } mBubblesPool2 = new List <GameObject>(); for (int i = 0; i < bubblesNum; i++) { mBubblesPool2.Add(Instantiate(mBubblesPrefab2, Vector3.zero, Quaternion.identity)); mBubblesPool2[i].SetActive(false); } }
void OnDisable() { if (playerMove == null) { playerMove = GetComponent <AuraDefaults>().Player.GetComponent <PlayerMoveInput>(); } playerMove.IsTeleport = false; }
void OnDisable() { if (playerMove == null) { playerMove = GetComponent <AuraDefaults>().Player.GetComponent <PlayerMoveInput>(); } playerMove.MaxFallSpeed = playerMove.BaseMaxFallSpeed; }
void OnDisable() { if (playerMove == null) { playerMove = GetComponent <AuraDefaults>().Player.GetComponent <PlayerMoveInput>(); } playerMove.JumpVelocity = playerMove.BaseJump; }
void Awake() { player = GameObject.FindGameObjectWithTag("Player"); playerMove = player.GetComponent <PlayerMoveInput>(); foreach (Transform child in transform) { if (child.tag == "SpawnPos") { spawnPos = child; } } }
void Awake() { playerMove = GameObject.FindGameObjectWithTag("Player").GetComponent <PlayerMoveInput>(); playerController = GameObject.FindGameObjectWithTag("Player").GetComponent <PlayerController>(); anim = GetComponent <Animator>(); // Init meteor pool meteorPool = new List <GameObject>(); for (int i = 0; i < poolNum; i++) { meteorPool.Add(Instantiate(meteorPrefab, Vector3.down * 80, Quaternion.identity)); } }
void Awake() { player = GameObject.FindGameObjectWithTag("Player").GetComponent <PlayerMoveInput>(); }
void Awake() { move = GetComponent <PlayerMoveInput>(); controller = GetComponent <PlayerController>(); auraControl = GetComponent <PlayerAuraControl>(); }
// Start is called before the first frame update void Start() { move = GetComponent <PlayerMoveInput>(); controller = GetComponent <PlayerController>(); anim = GetComponent <Animator>(); }