Ejemplo n.º 1
0
 public static void Postfix(BridgeMaterialType materialType)
 {
     if (materialType == BridgeMaterialType.BUNGINE_ROPE)
     {
         MasterAudio.PlaySoundAndForget("ui_build_cable_select", 1f, null, 0f, null, null);
     }
 }
Ejemplo n.º 2
0
 public static void Postfix(BridgeMaterialType material, Panel_Materials __instance)
 {
     if (!shouldRun() || instance.m_BungeeButton == null)
     {
         return;
     }
     if (material == BridgeMaterialType.BUNGINE_ROPE)
     {
         instance.m_BungeeButton.TurnOn();
     }
 }
Ejemplo n.º 3
0
            public static bool Prefix(BridgeMaterialType materialType, ref TwoStateButton __result, Panel_Materials __instance)
            {
                if (!shouldRun())
                {
                    return(true);
                }
                switch (materialType)
                {
                case BridgeMaterialType.ROAD:
                    __result = __instance.m_RoadButton;
                    return(false);

                case BridgeMaterialType.REINFORCED_ROAD:
                    __result = __instance.m_ReinforcedRoadButton;
                    return(false);

                case BridgeMaterialType.WOOD:
                    __result = __instance.m_WoodButton;
                    return(false);

                case BridgeMaterialType.STEEL:
                    __result = __instance.m_SteelButton;
                    return(false);

                case BridgeMaterialType.HYDRAULICS:
                    __result = __instance.m_HydraulicsButton;
                    return(false);

                case BridgeMaterialType.ROPE:
                    __result = __instance.m_RopeButton;
                    return(false);

                case BridgeMaterialType.CABLE:
                    __result = __instance.m_CableButton;
                    return(false);

                case BridgeMaterialType.SPRING:
                    __result = __instance.m_SpringButton;
                    return(false);

                case BridgeMaterialType.BUNGINE_ROPE:
                    __result = instance.m_BungeeButton;
                    return(false);
                }
                Debug.LogWarningFormat("Unexpected materialType in PanelMaterials.GetMaterialButton: {0}", new object[]
                {
                    materialType.ToString()
                });
                __result = null;
                return(false);
            }
Ejemplo n.º 4
0
 public static void Postfix(
     BridgeJoint jointA,
     BridgeJoint jointB,
     BridgeMaterialType materialType,
     ref BridgeEdge __result,
     PolyPhysics.Edge physicsEdge_onlyUsedWhenBreakingEdgesInSimulation = null
     )
 {
     if (!shouldRun())
     {
         return;
     }
     if (materialType == BridgeMaterialType.BUNGINE_ROPE)
     {
         addBungeeSpring(__result);
     }
 }
        public void addCount(BridgeMaterialType type)
        {
            switch (type)
            {
            case BridgeMaterialType.ROAD:
                instance.mRoad.Value++;
                break;

            case BridgeMaterialType.REINFORCED_ROAD:
                instance.mRRoad.Value++;
                break;

            case BridgeMaterialType.WOOD:
                instance.mWood.Value++;
                break;

            case BridgeMaterialType.STEEL:
                instance.mSteel.Value++;
                break;

            case BridgeMaterialType.HYDRAULICS:
                instance.mHydro.Value++;
                break;

            case BridgeMaterialType.ROPE:
                instance.mRope.Value++;
                break;

            case BridgeMaterialType.CABLE:
                instance.mCable.Value++;
                break;

            case BridgeMaterialType.SPRING:
                instance.mSpring.Value++;
                break;

            case BridgeMaterialType.BUNGINE_ROPE:
            case BridgeMaterialType.INVALID:
            default:
                break;
            }
        }