Exemplo n.º 1
0
    // Start is called before the first frame update
    void Start()
    {
        renderer.enabled = false;
        health           = max_health;

        holder = GameObject.FindGameObjectWithTag("Player").transform.GetChild(0).GetComponentInChildren <Hold_Object>();
        tm     = GameObject.FindGameObjectWithTag("Timeline_Manager").GetComponent <Timeline_Manager>();

        renderer.enabled = false;
        foreach (var textmesh in countdown_text)
        {
            textmesh.enabled = false;
        }



        //Collider[] found_objs = Physics.OverlapSphere(transform.position, 3.0f);

        //foreach (Collider collider in found_objs)
        //{
        //    if (door_activation == null)
        //    {
        //        door_activation = collider.gameObject.GetComponentInChildren<Door_Activation>();
        //    }
        //}
    }
Exemplo n.º 2
0
    // Start is called before the first frame update
    void Start()
    {
        renderer.enabled = false;
        health           = max_health;

        holder      = GameObject.FindGameObjectWithTag("Player").transform.GetChild(0).GetComponentInChildren <Hold_Object>();
        tm          = GameObject.FindGameObjectWithTag("Timeline_Manager").GetComponent <Timeline_Manager>();
        col         = GetComponent <Collider>();
        col.enabled = false;
    }
Exemplo n.º 3
0
    // Update is called once per frame
    void Update()
    {
        if (pl.object_holding_this != null)
        {
            object_holder                  = pl.object_holding_this.GetComponent <Hold_Object>();
            object_holder.is_holding       = false;
            object_holder.grabbed_item     = null;
            object_holder.grabbed_item_obj = null;



            // Activate Action
            switch (tag)
            {
            case "Time_Device":
            {
                Add_Time_Jump();
                break;
            }
            }
            Destroy(gameObject);
        }
    }