Ejemplo n.º 1
0
    public void RpcdoDamagebyItemIndex(Vector3 origin, Vector3 direction, int itemid, byte seed)
    {
        FPSItemEquipment item = UnitZ.itemManager.GetFPSitem(itemid);

        if (item != null)
        {
            FPSWeaponEquipment weapon = item.GetComponent <FPSWeaponEquipment>();
            if (weapon != null)
            {
                doDamage(origin, direction, weapon.BulletNum, weapon.Spread, seed, weapon.Damage, weapon.Distance, weapon.MaxPenetrate, NetID, Team);
            }
        }
    }
Ejemplo n.º 2
0
 public void AttachFPSItemViewAndCollector(FPSItemEquipment item, ItemCollector itemcollector)
 {
     UpdateCount+=1;
     if (item != null && FPSItemView != null) {
         RemoveEquipItem (FPSItemView);
         Quaternion rotationTemp = FPSItemView.transform.rotation;
         rotationTemp.eulerAngles += FPSItemView.RotationOffset;
         GameObject newitem = (GameObject)GameObject.Instantiate (item.gameObject, FPSItemView.transform.position, rotationTemp);
         newitem.transform.parent = FPSItemView.gameObject.transform;
         FPSEquipment = newitem.GetComponent<FPSItemEquipment> ();
         collectorAttachedTemp = itemcollector;
         SaveDataToItemCollector ((FPSWeaponEquipment)FPSEquipment.GetComponent<FPSWeaponEquipment> (), itemcollector);
     }
 }