Beispiel #1
0
    void UpdateShootForward()
    {
        if (Input.GetKeyDown(shootKey))
        {
            target = this.transform.position + this.transform.forward * 10;
//			this.transform.LookAt (target);
            GameObject br       = Instantiate(boomerang, this.transform.position + this.transform.forward * fowardDistance, Quaternion.identity);
            Follower   follower = br.GetComponent <Follower> ();
            follower.wasdMove = GetComponent <WASDMove> ();
            follower.Flyout(target);
            follower.player = this.gameObject.transform;
            Bonerang bonerang = br.GetComponent <Bonerang> ();
            bonerang.scoreUIMgr = scoreUIMgr;
            bloodMgr.bloodLoss();
        }
    }
Beispiel #2
0
 public void Hit(int damage)
 {
     if (damage > 0)
     {
         if (injureTimer <= 0)
         {
             kick.Play();
             mgr.bloodLoss();
             mgr.PlayHitAnimation();
             injureTimer = injuredInterval;
         }
     }
 }
Beispiel #3
0
    public void shoot()
    {
//		target = this.transform.position + this.transform.forward * 10;
        //			this.transform.LookAt (target);
        Vector3 initPos = rightHand.position;

        initPos.y = flyingHeight;
        GameObject br = Instantiate(boomerang, initPos + this.transform.forward * fowardDistance, Quaternion.identity);

        br.transform.SetParent(boomerangFolder);
        Follower follower = br.GetComponent <Follower> ();

        follower.GetRB();
        follower.wasdMove = GetComponent <WASDMove> ();
        follower.Flyout(target);
        follower.player = this.gameObject.transform;
        Bonerang bonerang = br.GetComponent <Bonerang> ();

        bonerang.scoreUIMgr = scoreUIMgr;
        bloodMgr.bloodLoss();

        isFinishShoot = true;
    }