Пример #1
0
        float destroyTime = 0;//限界寿命

        public override int UseSkill(IPlayer p, GameObject player)
        {
            base.UseSkill(p, player);
            Transform   muzzleTransform = p.GetPlayerTransform();
            GameObject  b = (GameObject)PhotonNetwork.Instantiate(bulletPrehub, muzzleTransform.position, muzzleTransform.rotation, 0);
            ThrowObject t = b.GetComponent <ThrowObject>();

            t.player = player;
            b.transform.Rotate(-b.transform.right, angle);
            t.Damage     = damage;
            t.Speed      = speed;
            t.DestoyTime = destroyTime;
            return(0);
        }
Пример #2
0
        public int UseSkill(IPlayer p)
        {
            Transform  muzzleTransform = p.GetPlayerTransform();
            GameObject b = (GameObject)PhotonNetwork.Instantiate(bulletObjest, muzzleTransform.position, muzzleTransform.rotation, 0);

            b.transform.Rotate(-b.transform.right, angle);
            ThrowObject t = b.GetComponent <ThrowObject>();

            //Debug.Log(t);
            t.Damage     = damage;
            t.Speed      = speed;
            t.DestoyTime = destroyTime;
            return(0);
        }