mirror of
https://github.com/Leahnaya/TheKingsRace.git
synced 2026-08-22 10:24:42 -05:00
Implemented tooltips when hovering over an item
Added some placeholder images for the items in the game made small adjustments to grapple
This commit is contained in:
@@ -1,13 +1,19 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
[CreateAssetMenu]
|
||||
public class Item: ScriptableObject {
|
||||
|
||||
//Set item characteristics
|
||||
public int id;
|
||||
public string itemName;
|
||||
public string description;
|
||||
public Sprite itemSprite;
|
||||
[Space]
|
||||
|
||||
//Set item values
|
||||
public float maxVelM;
|
||||
public float minVelM;
|
||||
public float curVelM;
|
||||
@@ -19,7 +25,8 @@ public class Item: ScriptableObject {
|
||||
public float recovTimeM;
|
||||
public float playerGravM;
|
||||
public int costM;
|
||||
|
||||
|
||||
//Updates player values to equip the item
|
||||
public virtual void Equip(PlayerStats p, GameObject player){
|
||||
if(maxVelM != 0){
|
||||
p.MaxVel += maxVelM;
|
||||
@@ -50,6 +57,7 @@ public class Item: ScriptableObject {
|
||||
}
|
||||
}
|
||||
|
||||
//Updates player values to unequip the item
|
||||
public virtual void Unequip(PlayerStats p, GameObject player){
|
||||
if(maxVelM != 0){
|
||||
p.MaxVel -= maxVelM;
|
||||
|
||||
@@ -15,6 +15,7 @@ MonoBehaviour:
|
||||
id: 7
|
||||
itemName: Glider
|
||||
description: Player Will Fall slower
|
||||
itemSprite: {fileID: 7798176430303134427, guid: 7f448051c9c906545bfd88ed2754392b, type: 3}
|
||||
maxVelM: 0
|
||||
minVelM: 0
|
||||
curVelM: 0
|
||||
|
||||
@@ -15,6 +15,7 @@ MonoBehaviour:
|
||||
id: 8
|
||||
itemName: Grapple
|
||||
description: Allows the use of a grapple
|
||||
itemSprite: {fileID: -7389470788071104723, guid: 7f448051c9c906545bfd88ed2754392b, type: 3}
|
||||
maxVelM: 0
|
||||
minVelM: 0
|
||||
curVelM: 0
|
||||
|
||||
@@ -15,6 +15,7 @@ MonoBehaviour:
|
||||
id: 10
|
||||
itemName: Nitro
|
||||
description: Boosts player speed
|
||||
itemSprite: {fileID: -295526885773654649, guid: 7f448051c9c906545bfd88ed2754392b, type: 3}
|
||||
maxVelM: 0
|
||||
minVelM: 0
|
||||
curVelM: 0
|
||||
|
||||
@@ -15,6 +15,7 @@ MonoBehaviour:
|
||||
id: 2
|
||||
itemName: Roller Skates
|
||||
description: More Slidey But Faster
|
||||
itemSprite: {fileID: -3696225328785611619, guid: 7f448051c9c906545bfd88ed2754392b, type: 3}
|
||||
maxVelM: 15
|
||||
minVelM: 0
|
||||
curVelM: 0
|
||||
|
||||
@@ -15,6 +15,7 @@ MonoBehaviour:
|
||||
id: 3
|
||||
itemName: Springs
|
||||
description: Jump Higher
|
||||
itemSprite: {fileID: 3996138432854981312, guid: 7f448051c9c906545bfd88ed2754392b, type: 3}
|
||||
maxVelM: 0
|
||||
minVelM: 0
|
||||
curVelM: 0
|
||||
|
||||
@@ -15,6 +15,7 @@ MonoBehaviour:
|
||||
id: 5
|
||||
itemName: Triple Jump
|
||||
description: Player gets an extra jump but has less jump height
|
||||
itemSprite: {fileID: -8809284872407378732, guid: 7f448051c9c906545bfd88ed2754392b, type: 3}
|
||||
maxVelM: 0
|
||||
minVelM: 0
|
||||
curVelM: 0
|
||||
|
||||
@@ -15,6 +15,7 @@ MonoBehaviour:
|
||||
id: 6
|
||||
itemName: Wall Run
|
||||
description: Allows player to run on walls
|
||||
itemSprite: {fileID: -7634698977955767800, guid: 7f448051c9c906545bfd88ed2754392b, type: 3}
|
||||
maxVelM: 0
|
||||
minVelM: 0
|
||||
curVelM: 0
|
||||
@@ -33,4 +34,3 @@ MonoBehaviour:
|
||||
hasNitroM: 0
|
||||
hasDashM: 0
|
||||
cooldownM: 0
|
||||
scriptM: {fileID: 11500000, guid: 535009eaa735a4c4e95c6fc270e32741, type: 3}
|
||||
|
||||
Reference in New Issue
Block a user