// Use this for initialization void Start() { bonusController = GameObject.Find("xBonusController").GetComponent <xBonusController>(); auSource = GetComponent <AudioSource>(); bulletBody = GetComponent <Rigidbody2D>(); bulletBody.AddForce(new Vector2(10, 0), ForceMode2D.Impulse); bulletAnim.SetActive(false); }
// Use this for initialization void Start() { bonusController = GameObject.Find("xBonusController").GetComponent <xBonusController>(); MoneyBoxCountTextObj = GameObject.Find("MoneyBoxCountText"); MoneyBoxCountText = MoneyBoxCountTextObj.GetComponent <Text>(); batteryBar = GetComponent <Image>(); MoneyBoxCountText.text = moneyBoxCount.ToString(); }