I am making a health bar.
So i have two tk2dSprite's In code I want to adjust the scale of the tk2dSprite that is the fill. I think I am doing everything correctly but it does nothing to the sprite at all:
public float scaleToSet = .5f;
tk2dSprite myBar;
// Use this for initialization
void Awake () {
Debug.Log (myBar);
myBar = (tk2dSprite)transform.GetComponent<tk2dSprite> ();
myBar.scale.Set (scaleToSet, 1.0f, 1.0f);
}
void Update () {
}
public void scaleX() {
myBar.scale.Set (scaleToSet, 1.0f, 1.0f);
Debug.Log ("WE SHOULD SCALE: " + scaleToSet);
}
I will be calling scaleX from another script.. but for testing on awake i tell it to scale to .5 and it does not do anything.
Please help.