public TDCPressurePlate(PressurePlateType mPressurePlateType, TDCRender mRenderComponent, TDCFloodFiller mFloodFillerComponent, TDCIDCaller mIDCallerComponent, TDCSpecialSquare mSpecialSquareComponent, string mTriggeredLabel, string mUntriggeredLabel) { _pressurePlateType = mPressurePlateType; _renderComponent = mRenderComponent; _floodFillerComponent = mFloodFillerComponent; _idCallerComponent = mIDCallerComponent; _specialSquareComponent = mSpecialSquareComponent; _triggeredLabel = mTriggeredLabel; _unTriggeredLabel = mUntriggeredLabel; _renderComponent.OnDraw += Draw; _specialSquareComponent.OnMoveToAllowed += SpecialSquareBehavior; }
public static Entity PressurePlateSingleUse(List<int> mTargetIDs = default(List<int>), List<int> mTargetEffects = default(List<int>)) { var result = new Entity(Tile) {Layer = TDLLayers.Floor, UpdateOrder = TDLOrders.Trapdoor}; var cRender = TDLComponentFactory.Render(@"environment\pressureplate", "pressureplatetiles", "single"); var cSpecialSquare = new TDCSpecialSquare(TDLPriorities.Trapdoor); var cIDCaller = new TDCIDCaller(mTargetIDs, mTargetEffects); var cFloodFiller = new TDCFloodFiller(TDLTags.PressurePlateSingleUse); var cPressurePlate = new TDCPressurePlate(TDCPressurePlate.PressurePlateType.Single, cRender, cFloodFiller, cIDCaller, cSpecialSquare, "triggered_single", "single"); result.AddTags(TDLTags.PressurePlateSingleUse); result.AddComponents(cRender, cPressurePlate, cSpecialSquare, cIDCaller, cFloodFiller); return result; }