Exemplo n.º 1
0
    private static void UpdateState(Instance smi, float dt)
    {
        UpdateCavity(smi, dt);
        bool      flag      = IsConfined(smi);
        bool      flag2     = IsOvercrowded(smi);
        bool      flag3     = !smi.isBaby && IsFutureOvercrowded(smi);
        KPrefabID component = smi.gameObject.GetComponent <KPrefabID>();

        component.SetTag(GameTags.Creatures.Confined, flag);
        component.SetTag(GameTags.Creatures.Overcrowded, flag2);
        component.SetTag(GameTags.Creatures.Expecting, flag3);
        SetEffect(smi, stuckEffect, flag);
        SetEffect(smi, overcrowdedEffect, !flag && flag2);
        SetEffect(smi, futureOvercrowdedEffect, !flag && flag3);
    }