Hello,
My target was 400$ to get an Android License and I get this from the Asset Store.
Now, I will make games for Android and I sell it on Android Market,
and I’m making my asset store products cheap and mostly free.
Thank you very much for the score effect script, was looking to make something like this myself and this will undoubtedly save a lot of time. I hope you make your goal and good luck in the future
Before I go completely nuts, here is the Score Effect Script code translated into C# and then tweaked so it doesn’t run after the score disappears and then a few more public variables added in for extra flexibility. Introducing the showPoint() function just allows you to call the function later if needed without having to make another script.
using UnityEngine;
using System.Collections;
public class PointCS : MonoBehaviour
{
private float getHitEffect;
private float targY;
private float stopEffectAtAlpha = 1f;
private Vector3 pointPosition;
public float point;
public GUISkin pointSkin;
public GUISkin pointSkinShadow;
public float fadeModifier = 30f;
public float upwardsMovementModifier = 200f;
public void Awake()
{
showPoint(Mathf.Round(Random.Range(point/2, point*2)));
}
private void OnGUI()
{
if((getHitEffect - 50) / 7 < stopEffectAtAlpha)
{
getHitEffect += Time.deltaTime * fadeModifier;
GUI.color = new Color (1.0f,1.0f,1.0f,1.0f - (getHitEffect - 50) / 7);
GUI.skin = pointSkinShadow;
GUI.Label (new Rect(pointPosition.x+8 , targY-2, 80, 70), "+" + point.ToString());
GUI.skin = pointSkin;
GUI.Label (new Rect(pointPosition.x+10 , targY, 120, 120), "+" + point.ToString());
}
}
private IEnumerator updateTextMovement()
{
while((getHitEffect - 50) / 7 < stopEffectAtAlpha)
{
targY -= Time.deltaTime * upwardsMovementModifier;
yield return new WaitForEndOfFrame();
}
//Perferably remove the component after it's complete
}
public void showPoint(float newPoint)
{
point = newPoint;
getHitEffect = 0f;
pointPosition = transform.position + new Vector3(Random.Range(-1,1), 0, Random.Range(-1,1));
//Now convert it from the position in world to screen space and use it in the GUI
pointPosition = Camera.main.WorldToScreenPoint(pointPosition);
targY = Screen.height/2;
StartCoroutine(updateTextMovement());
}
}
In case it isn’t clear, this is free to use for anything, I just thought it might be potentially useful to C# programmers.
Hey bisaniyehocam,
My unity is 3.3.so,i can’t download Score Effect Script.
So Can you give me this project direct without asset store.
My problem is that i can’t update unity 3.4.