-
Notifications
You must be signed in to change notification settings - Fork 2
/
weaponProperties.cs
41 lines (34 loc) · 1.08 KB
/
weaponProperties.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
using UnityEngine;
using System.Collections;
public class weaponProperties : MonoBehaviour {
public int damage;
public int range;
public float delay;
public string special;
public int expReturn;
public int spAmount;
public float lifeTime;
public string weaponName;
public string description;
//this is for adding the upgrade onto the weapon stats
public weaponProperties add (weaponProperties original, weaponProperties upgrade){
weaponProperties final = new weaponProperties();
final.damage = original.damage + upgrade.damage;
final.special = string.Concat (original.special, upgrade.special);
final.spAmount = original.spAmount + upgrade.spAmount;
final.range = original.range + upgrade.range;
final.delay = original.delay + upgrade.delay;
return final;
}
//it should be a constructor:
public void giveValue (weaponProperties weapon){
damage = weapon.damage;
delay = weapon.delay;
range = weapon.range;
special = weapon.special;
spAmount = weapon.spAmount;
weaponName = weapon.weaponName;
lifeTime = weapon.lifeTime;
expReturn = weapon.expReturn;
}
}