| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
using UnityEngine;
using UnityEngine.UI;
public class GiftFall : MonoBehaviour
{
public float fallSpeed = 2.0f;
public GameObject sparkleEffect;
public Text messageText;
private bool hasLanded = false;
void Start()
{
messageText.text = "Raksha Bandhan Gift Coming...";
}
void Update()
{
if (!hasLanded)
{
transform.position += Vector3.down * fallSpeed * Time.deltaTime;
if (transform.position.y <= 0.5f)
{
hasLanded = true;
Instantiate(sparkleEffect, transform.position, Quaternion.identity);
messageText.text = "Gift Arrived! 💝";
}
}
}
}
|
你的邮件已收到,我会尽快给你回复。
|
Sorry, something went wrong.
|
Ok
…On Sat, 2 Aug 2025, 14:00 qingshu, ***@***.***> wrote:
*qingshu* left a comment (Unity-Technologies/UnityCsReference#37)
<#37 (comment)>
你的邮件已收到,我会尽快给你回复。
—
Reply to this email directly, view it on GitHub
<#37 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/BVOYW4W4NPXGCYYQJ2ZCE6T3LRZJ3AVCNFSM6AAAAACC6OFNP2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTCNBWGM2TCMJUG4>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
using UnityEngine;
using UnityEngine.UI;
public class GiftFall : MonoBehaviour
{
public float fallSpeed = 2.0f;
public GameObject sparkleEffect;
public Text messageText;
private bool hasLanded = false; void Start() { messageText.text = "Raksha Bandhan Gift Coming..."; } void Update() { if (!hasLanded) { transform.position += Vector3.down * fallSpeed * Time.deltaTime; if (transform.position.y <= 0.5f) { hasLanded = true; Instantiate(sparkleEffect, transform.position, Quaternion.identity); messageText.text = "Gift Arrived! 💝"; } } }}