Exemple #1
0
    private bool ImplantBomb()
    {
        BodyPart limb = RandomLimb();

        Debug.Log($"Bomb implanted in {limb.name}");
        textLog.NewLogEntry($"There's an explosive device in the {limb.name}");

        EmbeddedObject newBomb = FindObjectOfType <ObjectSpawner>().SpawnBomb("bomb");

        newBomb.Embed(limb);

        return(true);
    }
Exemple #2
0
    private bool ShootOrgan()
    {
        Organ organ = RandomOrgan();

        Debug.Log($"Shot {organ.name}");
        textLog.NewLogEntry($"The {organ.name} has been shot.");

        organ.damage         = Mathf.Min(organ.damage + 30, organ.damageMax);
        organ.bloodLossRate += 10;

        if (organ.connectedBodyParts.Count > 0)
        {
            BodyPart parentBodyPart = organ.connectedBodyParts[0];
            parentBodyPart.damage         = Mathf.Min(parentBodyPart.damage + 30, parentBodyPart.damageMax);
            parentBodyPart.bloodLossRate += 10;

            EmbeddedObject newBullet = FindObjectOfType <ObjectSpawner>().SpawnBullet("bullet");
            newBullet.Embed(organ);
        }

        return(true);
    }
Exemple #3
0
    public static void EmbedObjectProcess(EmbeddedObject embeddedObject, BodyPart bodypart)
    {
        //connect
        embeddedObject.Embed(bodypart);
        try
        {
            if (UnityEngine.SceneManagement.SceneManager.GetActiveScene().name == "SampleScene")
            {
                GameObject.FindObjectOfType <BodyPartSelectorManager>().ResetSelectors();
                GameObject.FindObjectOfType <EmbeddedObjectSelectorManager>().ResetSelectors();
                MonoBehaviour.FindObjectOfType <BodyPartStatusManager>().UpdateStatusCollection();
            }
        }
        catch (System.Exception e)
        {
            Debug.LogError($"EmbedObjectProcess: {e}");
        }

        UpdateAllBodyPartHeartConnections();

        MonoBehaviour.FindObjectOfType <ActionTracker>().surgery_implants += 1;
    }
Exemple #4
0
    private bool ShootLimb()
    {
        BodyPart limb = RandomLimb();

        Debug.Log($"Shot {limb.name}");
        textLog.NewLogEntry($"The {limb.name} has been shot.");

        limb.damage         = Mathf.Min(limb.damage + 30, limb.damageMax);
        limb.bloodLossRate += 10;

        if (limb is Organ && limb.connectedBodyParts.Count > 0)
        {
            BodyPart parentBodyPart = limb.connectedBodyParts[0];
            parentBodyPart.damage         = Mathf.Min(parentBodyPart.damage + 30, parentBodyPart.damageMax);
            parentBodyPart.bloodLossRate += 10;
        }

        EmbeddedObject newBullet = FindObjectOfType <ObjectSpawner>().SpawnBullet("bullet");

        newBullet.Embed(limb);

        return(true);
    }