コード例 #1
0
 // Use this for initialization
 void Awake()
 {
     myBody      = GetComponent <Rigidbody>();
     playerAnim  = GetComponent <PlayerAnimation>();
     bgScroller  = GameObject.Find(Tags.BACKGROUND_OBJ).GetComponent <BGScroller>();
     playerShoot = GetComponent <PlayerHealthDamageShoot>();
 }
コード例 #2
0
 void Awake()
 {
     myBody      = GetComponent <Rigidbody>();
     playerAnim  = GetComponent <PlayerAnimation>();
     bgScroller  = GameObject.Find(Tags.BACKGROUND_GAME_OBJ).GetComponent <BGScroller>();
     playerShoot = GetComponent <PlayerHealthDamageShoot>();
     jumpBtn     = GameObject.Find(Tags.JUMP_BUTTON_OBJ).GetComponent <Button>();
     jumpBtn.onClick.AddListener(() => Jump());
 }
コード例 #3
0
    void Awake()
    {
        myBody                  = GetComponent <Rigidbody>();
        playerAnimation         = GetComponent <PlayerAnimation>();
        playerHealthDamageShoot = GetComponent <PlayerHealthDamageShoot>();
        smokePosition.SetActive(false);
        bgScroller = GameObject.FindGameObjectWithTag(Tags.BACKGROUND_TAG).GetComponent <BGScroller>();

        jumpButton.onClick.AddListener(() => Jump());
    }
コード例 #4
0
    void Awake()
    {
        myBody      = GetComponent <Rigidbody> ();
        playerAnim  = GetComponent <PlayerAnnimation> ();
        bgScroller  = GameObject.Find(Tags.Backgrund_GameObjTag).GetComponent <BGScroller> ();
        playerShoot = GetComponent <PlayerHealthDamageShoot>();

        jumpBtn = GameObject.Find(Tags.Jump_Button_Obj).GetComponent <Button>();
        jumpBtn.onClick.AddListener(() => Jump());
    }