Exemple #1
0
 public void AddWeapon(WeaponRuntime weapon)
 {
     weaponList.Add(weapon);
     currentId++;
     weapon.InitNetData(netData);
     changeWeapon(weapon.weaponId);
     (netData as PlayerData).skillList.AddSkill(weapon.defalutSkillId);
 }
 public void AddWeapon(WeaponRuntime weapon)
 {
     weaponList.Add(weapon);
     currentId++;
     weapon.InitNetData(netData);
     changeWeapon(weapon.weaponId);
     (netData as PlayerData).skillList.AddSkill(weapon.defalutSkillId);
     //UnityEngine.Debug.LogError("add "+Weapon.WeaponId);
 }
Exemple #3
0
    public static WeaponRuntime Parse(WeaponData weaponData)
    {
        WeaponRuntime runtime;

        if (weaponData.weaponType == WeaponType.枪)
        {
            runtime = new Gun();
        }
        else
        {
            runtime = new WeaponRuntime();
        }
        runtime.weaponData = weaponData;
        return(runtime);
    }
    // TODO: consider what we need to put here.
    // things like durability, any temporary bonuses, etc. etc.
    public WeaponRuntime ToRuntime(WeaponSystem owner)
    {
        var runtime = new WeaponRuntime(owner, this);

        return(runtime);
    }
Exemple #5
0
 public void AddWeapon(WeaponId weaponId)
 {
     AddWeapon(WeaponRuntime.Parse(WeaponManager.Get(weaponId.ToString())));
 }
 public void StartUse()
 {
     weapon = player.weaponSystem.curWeapon <WeaponRuntime>();
     skillData.SetTrigger(SkillTrigger.PressStart, this);
 }