Beispiel #1
0
    void Start()
    {
        //Finding the gameobject with the tag Player and getting its script(component, ThirdPersonLogic).
        Sanzus = GameObject.FindGameObjectWithTag ("Player").GetComponent<ThirdPersonLogic>();

        //Storing the urnPosition as the holder's position.
        itemDropPosition = transform.position;

        //Increaing the Y position so the itemDrop doesn't sink into the ground.
        itemDropPosition.y += 0.5f;
    }
Beispiel #2
0
    private Vector3 itemDropPosition;    //Position where the item will drop.

    void Start()
    {
        //Finding the gameobject with the tag Player and getting its script(component, ThirdPersonLogic).
        Sanzus = GameObject.FindGameObjectWithTag("Player").GetComponent <ThirdPersonLogic>();

        //Storing the urnPosition as the holder's position.
        itemDropPosition = transform.position;

        //Increaing the Y position so the itemDrop doesn't sink into the ground.
        itemDropPosition.y += 0.5f;
    }
Beispiel #3
0
    void Start()
    {
        //Find the gameObject with the tag Player and storing its component(Script, ThirdPersonLogic) as Sanzus.
        Sanzus = GameObject.FindGameObjectWithTag ("Player").GetComponent<ThirdPersonLogic> ();

        //Get the particle system of the script Holder(Crate/Box)
        particleSystem = gameObject.GetComponentInChildren<ParticleSystem>();

        //Stop the particle system from playing.
        particleSystem.Stop();

        //Setting the boxHealh.
        boxHealth = 4;

        //Settng thte itemDropPosition at the script Holder's position.
        itemDropPosition = transform.position;

        //Increasing the Y-axis value so the item doesn't sink into the ground.
        itemDropPosition.y += 0.5f;
    }
Beispiel #4
0
    void Start()
    {
        //Find the gameObject with the tag Player and storing its component(Script, ThirdPersonLogic) as Sanzus.
        Sanzus = GameObject.FindGameObjectWithTag("Player").GetComponent <ThirdPersonLogic> ();

        //Get the particle system of the script Holder(Crate/Box)
        particleSystem = gameObject.GetComponentInChildren <ParticleSystem>();

        //Stop the particle system from playing.
        particleSystem.Stop();

        //Setting the boxHealh.
        boxHealth = 4;

        //Settng thte itemDropPosition at the script Holder's position.
        itemDropPosition = transform.position;

        //Increasing the Y-axis value so the item doesn't sink into the ground.
        itemDropPosition.y += 0.5f;
    }