void Spawn_Patient_Bed()
    {
        // Spawning bool
        anim_control.SetBool("Spawning", false);

        if (current_template_id < queue_templates.Count)
        {
            GameObject new_instance = Instantiate(patient_prefab);

            new_instance.transform.parent   = transform;
            new_instance.transform.position = transform.position + offset_spawpoint;

            Patient_Bed script = new_instance.GetComponent <Patient_Bed>();
            script.name        = script.name.Replace("(Clone)", "");
            script.template_id = queue_templates[current_template_id];
            current_template_id++;
        }
    }
예제 #2
0
    // Use equiped item
    void Use_Item()
    {
        // Project raycast for action
        RaycastHit2D new_info = Action_Raycast();

        // Match new info to target type
        if (new_info)
        {
            Patient_Bed current_patient = new_info.transform.GetComponent <Patient_Bed>();

            if (current_patient != null)
            {
                current_patient._Check_Treatment(item_slot.item_id);
                //print("Item: Used");
                return;
            }
        }
        //print("Item: " + item_slot.name);
    }