コード例 #1
0
ファイル: TDCOrb.cs プロジェクト: SuperV1234/TimeDRODPOF
        public TDCOrb(bool mIsBroken, int mHealth, TDCRender mRenderComponent, TDCIDCaller mIDCallerComponent)
        {
            _isBroken = mIsBroken;
            _health = mHealth;
            _renderComponent = mRenderComponent;
            _idCallerComponent = mIDCallerComponent;

            mRenderComponent.OnDraw += Draw;
        }
コード例 #2
0
        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;
        }
コード例 #3
0
ファイル: TDLFactory.cs プロジェクト: SuperV1234/TimeDRODPOF
        public static Entity Orb(List<int> mTargetIDs = default(List<int>), List<int> mTargetEffects = default(List<int>), bool mIsBroken = false, int mHealth = 2)
        {
            var result = new Entity(Tile) {Layer = TDLLayers.Orb};

            var cRender = TDLComponentFactory.Render(@"elements\orb", "orbtiles", "on");
            var cIDCaller = new TDCIDCaller(mTargetIDs, mTargetEffects);
            var cOrb = new TDCOrb(mIsBroken, mHealth, cRender, cIDCaller);
            var cHitByWeapon = new TDCHitByWeapon(cOrb.Struck);

            if (mIsBroken) TDLMethods.AttachCrackedOverlay(cRender, mHealth >= 2 ? 0 : 1);

            result.AddTags(TDLTags.Solid, TDLTags.HitByWeapon, TDLTags.GroundPathmapObstacle);
            result.AddComponents(cRender, cHitByWeapon, cIDCaller, cOrb);

            return result;
        }
コード例 #4
0
ファイル: TDLFactory.cs プロジェクト: SuperV1234/TimeDRODPOF
        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;
        }
コード例 #5
0
ファイル: TDCID.cs プロジェクト: SuperV1234/TimeDRODPOF
 public void RecieveCall(TDCIDCaller mCaller, int mEffect)
 {
     if (OnCallRecieved != null) OnCallRecieved.Invoke(mEffect);
 }