Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //****** Donations are greatly appreciated. ******
- //****** You can donate directly to Jesse through paypal at https://www.paypal.me/JEtzler ******
- var item_attackPower : float;
- var item_type : int;
- var item_icon : Texture2D;
- //item_type. 0 = weapon, 1 = helm, 2 = shoulders
- public var item : Transform;
- function Start () {
- item.parent = gameObject.Find("Undead_RightHandIndex1").transform;
- item.localPosition = Vector3(0, 0, 0);
- //item.localRotation = Quaternion.Identity;
- playerStats.attackPower += item_attackPower;
- itemType();
- }
- function Update () {
- }
- function itemType () {
- var otherScript: playerStats = gameObject.Find("player").GetComponent(playerStats);
- switch (item_type){
- case ("0"):
- otherScript.weaponSlot[0] = item_icon;
- break;
- case ("1"):
- otherScript.weaponSlot[1] = item_icon;
- break;
- case ("2"):
- otherScript.weaponSlot[2] = item_icon;
- break;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement