Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System.Collections;
- using System.Collections.Generic;
- using NUnit.Framework.Constraints;
- using UnityEngine;
- public class Dumbbell : MonoBehaviour
- {
- public int dumbbellWeight;
- public void UpdateSprite(int dumbbelWeight)
- {
- GameObject spriteWeight = transform.Find("WeightNum").gameObject;
- SpriteRenderer spriteWeightRenderer = spriteWeight.GetComponent<SpriteRenderer>();
- spriteWeightRenderer.sprite = Resources.Load<Sprite>("Images\\" + dumbbelWeight);
- }
- public static bool operator >=(Dumbbell left,Dumbbell right)
- {
- return left.dumbbellWeight>=right.dumbbellWeight;
- }
- public static bool operator <=(Dumbbell left, Dumbbell right)
- {
- return left.dumbbellWeight<=right.dumbbellWeight;
- }
- public static bool operator >(Dumbbell left, Dumbbell right)
- {
- return left.dumbbellWeight > right.dumbbellWeight;
- }
- public static bool operator <(Dumbbell left, Dumbbell right)
- {
- return left.dumbbellWeight < right.dumbbellWeight;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement