Skip to content

README.mdPlay #37

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

prathmeshbhosle1617-ops
Copy link

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! 💝";
        }
    }
}

}

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! 💝";
            }
        }
    }
}
@qingshu
Copy link

qingshu commented Aug 2, 2025 via email

@prathmeshbhosle1617-ops
Copy link
Author

prathmeshbhosle1617-ops commented Aug 2, 2025 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants