private void Awake()
 {
     _rigid        = GetComponent <Rigidbody2D>();
     _controller   = GetComponent <PlayerController>();
     player_SE     = GetComponentInChildren <PlayerSoundEffect>();
     player_Effect = GetComponentInChildren <PlayerEffect>();
 }
 private void Start()
 {
     player            = transform.parent.gameObject;
     player_Controller = player.GetComponent <PlayerController>();
     player_SE         = player.GetComponentInChildren <PlayerSoundEffect>();
     player_Effect     = player.GetComponentInChildren <PlayerEffect>();
     player_Rigid      = player.GetComponent <Rigidbody2D>();
 }
 // Use this for initialization
 void Awake()
 {
     //取得
     _controller    = GetComponent <PlayerController>();
     _shoot         = GetComponent <PlayerShoot>();
     player_Effect  = GetComponentInChildren <PlayerEffect>();
     player_SE      = GetComponentInChildren <PlayerSoundEffect>();
     player_Body    = GetComponentInChildren <PlayerBodyCollision>();
     _rigid         = GetComponent <Rigidbody2D>();
     kick_Collision = GetComponentInChildren <PlayerKickCollision>();
 }
    void Start()
    {
        // looks in the (current) gameObject for component of type Rigidbody
        // gameObject.GetComponent<Rigidbody>() would work as well
        playerRb     = GetComponent <Rigidbody>();
        soundEffects = GetComponent <PlayerSoundEffect>();
        //activatePlayer();

        speech = new SpeechIn(onSpeechRecognized);
        speech.StartListening(new string[] { "help", "resume" });
    }
Beispiel #5
0
 // Use this for initialization
 public void Start()
 {
     //isLockedforAnimations = false;//leave unset for other scripts
     facingRight       = true;
     isJumping         = false;
     isGrounded        = true;
     isClimbing        = false;
     isFalling         = false;
     myAnimator        = GetComponent <Animator>();
     playersoundeffect = GameObject.Find("Player").GetComponent <PlayerSoundEffect>();
 }
 // Use this for initialization
 void Awake()
 {
     //取得
     _controller      = GetComponent <PlayerController>();
     player_SE        = GetComponentInChildren <PlayerSoundEffect>();
     _anim            = GetComponent <Animator>();
     _rigid           = GetComponent <Rigidbody2D>();
     attack_Collision = GetComponentInChildren <PlayerAttackCollision>();
     player_Manager   = PlayerManager.Instance;
     spider_Footing   = Resources.Load("Object/SpiderFooting") as GameObject;
     //オブジェクトプール
     ObjectPoolManager.Instance.Create_New_Pool(mantis_Attack_Bullet, 5);
 }
 private void Start()
 {
     //取得
     player_Manager   = PlayerManager.Instance;
     _controller      = GetComponent <PlayerController>();
     player_SE        = GetComponentInChildren <PlayerSoundEffect>();
     player_Effect    = GetComponentInChildren <PlayerEffect>();
     _attack          = GetComponent <PlayerAttack>();
     _anim            = GetComponent <Animator>();
     _rigid           = GetComponent <Rigidbody2D>();
     attack_Collision = GetComponentInChildren <PlayerChargeAttackCollision>();
     camera_Shake     = GameObject.FindWithTag("MainCamera").GetComponent <CameraShake>();
 }
 // Use this for initialization
 void Awake()
 {
     //取得
     _controller      = GetComponent <PlayerController>();
     player_SE        = GetComponentInChildren <PlayerSoundEffect>();
     _anim            = GetComponent <Animator>();
     _rigid           = GetComponent <Rigidbody2D>();
     attack_Collision = GetComponentInChildren <PlayerAttackCollision>();
     kick_Collision   = GetComponentInChildren <PlayerKickCollision>();
     player_Manager   = PlayerManager.Instance;
     //オブジェクトプール
     ObjectPoolManager.Instance.Create_New_Pool(mantis_Attack_Bullet, 5);
 }
 // Use this for initialization
 void Start()
 {
     //弾のオブジェクトプール
     ObjectPoolManager.Instance.Create_New_Pool(normal_Bullet, 5);
     ObjectPoolManager.Instance.Create_New_Pool(bee_Bullet, 5);
     ObjectPoolManager.Instance.Create_New_Pool(butterfly_Bullet, 5);
     ObjectPoolManager.Instance.Create_New_Pool(mantis_Bullet, 5);
     ObjectPoolManager.Instance.Create_New_Pool(spider_Bullet, 5);
     //取得
     player_Manager    = PlayerManager.Instance;
     player_Controller = GetComponent <PlayerController>();
     player_Effect     = GetComponentInChildren <PlayerEffect>();
     player_SE         = GetComponentInChildren <PlayerSoundEffect>();
     main_Camera       = GameObject.FindWithTag("MainCamera");
     camera_Shake      = main_Camera.GetComponent <CameraShake>();
 }
Beispiel #10
0
 private void Start()
 {
     //取得
     player_SE = GetComponentInChildren <PlayerSoundEffect>();
 }
Beispiel #11
0
    protected override void Awake()
    {
        base.Awake();

        myBirdAnim = myBirdTransform.GetComponent<Animator> ();
        myBirdAudio =  myBirdTransform.GetComponent<AudioSource> ();
        mySpecialAudio = GetComponent<PlayerSoundEffect> ();
    }
 private void Awake()
 {
     player_SE = transform.parent.GetComponentInChildren <PlayerSoundEffect>();
 }
Beispiel #13
0
    /* End of Getters & Setters */
    protected override void Awake()
    {
        base.Awake();

        myRb = GetComponent<Rigidbody2D> ();
        myAnim = GetComponent<Animator> ();
        myAudio = GetComponent<PlayerSoundEffect> ();

        EquipWeapon (myTransform.FindChild ("Weapon").GetComponent<Weapon> ());
        initialMaxDoubleJump = maxDoubleJump;
    }