예제 #1
0
    public void AddStatus(BodyPart bodyPart)
    {
        GameObject     statusGameObject = Instantiate(statusPrefab, statusPanel.transform);
        BodyPartStatus status           = statusGameObject.GetComponent <BodyPartStatus>();

        status.name = bodyPart.name;

        if (bodyPart is Organ)
        {
            status.partName.text = "  " + bodyPart.name;
        }
        else
        {
            status.partName.text = bodyPart.name;
        }

        BloodBar  bloodBar  = status.bloodBar;
        OxygenBar oxygenBar = status.oxygenBar;
        HealthBar healthBar = status.healthBar;

        bloodBar.bodyPart = bodyPart;
        bloodBar.MinMax();
        oxygenBar.bodyPart = bodyPart;
        oxygenBar.MinMax();
        healthBar.bodyPart = bodyPart;
        healthBar.MinMax();
    }
예제 #2
0
 public static Game.BodyPartStatus Conv(this BodyPartStatus el)
 {
     return((Game.BodyPartStatus)el);
 }