void OnEnable() { if (playerInputController == null) { playerInputController = gameObject.GetComponent <Player_Input_Controller>(); } if (playerData == null) { playerData = gameObject.GetComponent <Player_Data>(); } if (objectPooler == null) { objectPooler = GameObject.FindWithTag("GameController").GetComponent <Object_Pooler>(); } if (balloonRB2D == null) { balloonRB2D = gameObject.transform.GetChild(0).GetComponent <Rigidbody2D>(); } if (basketRB2D == null) { basketRB2D = gameObject.transform.GetChild(1).GetComponent <Rigidbody2D>(); } if (fireAnimator == null) { fireAnimator = gameObject.transform.GetChild(1).transform.GetChild(1).GetComponent <Animator>(); } if (audioSource == null) { audioSource = gameObject.transform.GetChild(2).GetComponent <AudioSource>(); } if (cannon == null) { cannon = gameObject.transform.GetChild(1).GetChild(0).gameObject; } if (cannonShootEffect == null) { cannonShootEffect = cannon.transform.GetChild(0).gameObject; } }
GameObject GetPooledObject(List <GameObject> object_Pool_List) { return(Object_Pooler.GetPooledObject(object_Pool_List)); }
private void Awake() { Instance = this; }