コード例 #1
0
ファイル: Bullet.cs プロジェクト: murselsenay/DronEscape
 // 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);
 }
コード例 #2
0
 // 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();
 }