Example #1
0
 private void Awake()
 {
     anim           = GetComponent <Animator>();
     rb             = GetComponent <Rigidbody2D>();
     se             = transform.Find("SoundEffecter").gameObject.GetComponent <SoundEffecter>();
     gameController = GameObject.FindGameObjectWithTag(Tags.GameController).GetComponent <GameController>();
 }
Example #2
0
 private void Start()
 {
     // クラスを代入
     difficulty     = GetComponent <Difficulty>();
     stageGenerator = GetComponent <StageGenerator>();
     cameraMover    = GetComponent <CameraMover>();
     playerMover    = player.GetComponent <PlayerMover>();
     soundEffecter  = GameObject.FindWithTag("SoundEffect").GetComponent <SoundEffecter>();
     // ゲームステージを生成
     stageGenerator.Generate();
     // 前回から継続してるなら、UI消してスタート
     if (isContinue)
     {
         titleUI.TitleFalse();
         StartGame();
     }
 }
Example #3
0
 private void Start()
 {
     // コンポーネントを取得
     rb            = GetComponent <Rigidbody>();
     soundEffecter = GameObject.FindWithTag("SoundEffect").GetComponent <SoundEffecter>();
 }
Example #4
0
 private void Awake()
 {
     anim = GetComponent <Animator>();
     se   = transform.Find("SoundEffecterEnemy").gameObject.GetComponent <SoundEffecter>();
 }
Example #5
0
 private void Start()
 {
     foodText  = GameObject.Find("Food Text").GetComponent <Text>();
     stepSound = transform.Find("Footstep Sound").gameObject.GetComponent <SoundEffecter>();
 }
Example #6
0
 private void Awake()
 {
     anim     = GetComponent <Animator>();
     atkRange = GetComponent <CircleCollider2D>();
     sound    = GetComponent <SoundEffecter>();
 }