コード例 #1
0
ファイル: TDCOremites.cs プロジェクト: SuperV1234/TimeDRODPOF
        public TDCOremites(TDCSpecialSquare mSpecialSquareComponent)
        {
            _specialSquareComponent = mSpecialSquareComponent;

            _specialSquareComponent.OnMoveFromAllowed += SpecialSquareFrom;
            _specialSquareComponent.OnMoveToAllowed += SpecialSquareTo;
        }
コード例 #2
0
        public TDCOrthogonalSquare(TDCSpecialSquare mSpecialSquareComponent, TDCSwitch mSwitchComponent)
        {
            _switchComponent = mSwitchComponent;

            mSpecialSquareComponent.OnMoveFromAllowed += SpecialSquareMove;
            mSpecialSquareComponent.OnMoveToAllowed += SpecialSquareMove;
        }
コード例 #3
0
ファイル: TDCTrapdoor.cs プロジェクト: SuperV1234/TimeDRODPOF
        public TDCTrapdoor(bool mIsOnWater, bool mIsBroken, TDCSpecialSquare mSpecialSquareComponent, TDCSwitch mSwitchComponent)
        {
            _isOnWater = mIsOnWater;
            _isBroken = mIsBroken;
            _switchComponent = mSwitchComponent;

            mSpecialSquareComponent.OnMoveFromAllowed += SpecialSquareMove;
        }
コード例 #4
0
ファイル: TDCBooster.cs プロジェクト: SuperV1234/TimeDRODPOF
        public TDCBooster(TDCDirection mDirectionComponent, TDCSwitch mSwitchComponent, TDCSpecialSquare mSpecialSquareComponent)
        {
            _directionComponent = mDirectionComponent;
            _switchComponent = mSwitchComponent;
            _specialSquareComponent = mSpecialSquareComponent;

            _specialSquareComponent.OnMoveFromAllowed += SpecialSquareFrom;
        }
コード例 #5
0
ファイル: TDCArrow.cs プロジェクト: SuperV1234/TimeDRODPOF
        public TDCArrow(TDCSpecialSquare mSpecialSquareComponent, TDCDirection mDirectionComponent, TDCSwitch mSwitchComponent)
        {
            _directionComponent = mDirectionComponent;
            _switchComponent = mSwitchComponent;

            mSpecialSquareComponent.OnMoveFromAllowed += SpecialSquareMove;
            mSpecialSquareComponent.OnMoveToAllowed += SpecialSquareMove;
        }
コード例 #6
0
ファイル: TDCHotTile.cs プロジェクト: SuperV1234/TimeDRODPOF
        public TDCHotTile(TDCSpecialSquare mSpecialSquareComponent, int mTurnsToBurn)
        {
            _specialSquareComponent = mSpecialSquareComponent;
            _onMeEntities = new List<Entity>();
            _onMeTurnsToBurn = new List<int>();
            _turnsToBurn = mTurnsToBurn;

            _specialSquareComponent.OnMoveFromAllowed += SpecialSquareFrom;
            _specialSquareComponent.OnMoveToAllowed += SpecialSquareTo;
        }
コード例 #7
0
ファイル: TDCTunnel.cs プロジェクト: SuperV1234/TimeDRODPOF
        public TDCTunnel(TDCRender mRenderComponent, TDCDirection mDirectionComponent, TDCSpecialSquare mSpecialSquareComponent)
        {
            _renderComponent = mRenderComponent;
            _directionComponent = mDirectionComponent;
            _specialSquareComponent = mSpecialSquareComponent;

            _renderComponent.OnDraw += Draw;
            _specialSquareComponent.OnMoveFromAllowed += SpecialSquareFrom;
            _specialSquareComponent.OnMoveToAllowed += SpecialSquareTo;
        }
コード例 #8
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;
        }
コード例 #9
0
ファイル: TDLFactory.cs プロジェクト: SuperV1234/TimeDRODPOF
        public static Entity Arrow(int mDirection = 0, bool mIsOff = false, List<int> mIDs = default(List<int>))
        {
            var result = new Entity(Tile) {Layer = TDLLayers.Arrow, UpdateOrder = TDLOrders.Trapdoor};

            var cRender = TDLComponentFactory.Render(@"environment\arrow", "onoffdirtiles", "on_n");
            var cDirection = new TDCDirection(mDirection);
            var cSpecialSquare = new TDCSpecialSquare(TDLPriorities.Arrow);
            var cID = TDLComponentFactory.ID(mIDs);
            var cSwitch = new TDCSwitch(cRender, mIsOff);
            cSwitch.SetOffTextureRect(Assets.GetTileset("onoffdirtiles").GetTextureRect("off_" + cDirection.DirectionString));
            cSwitch.SetOnTextureRect(Assets.GetTileset("onoffdirtiles").GetTextureRect("on_" + cDirection.DirectionString));
            var cIDSwitchAI = new TDCIDSwitchAI(cSwitch, cID);
            var cArrow = new TDCArrow(cSpecialSquare, cDirection, cSwitch);

            cSwitch.OnlyOnTags.Add(TDLTags.GroundPathmapObstacle);

            result.AddTags(TDLTags.Arrow);
            result.AddComponents(cRender, cDirection, cSpecialSquare, cID, cSwitch, cIDSwitchAI, cArrow);

            return result;
        }
コード例 #10
0
ファイル: TDLFactory.cs プロジェクト: SuperV1234/TimeDRODPOF
        public static Entity Trapdoor(bool mIsOff = false, List<int> mIDs = default(List<int>), bool mIsOnWater = false, bool mIsBroken = false)
        {
            var result = new Entity(Tile) {Layer = TDLLayers.Trapdoor, UpdateOrder = TDLOrders.Trapdoor};

            var trapdoorTexture = @"environment\trapdoor";
            if (mIsOnWater) trapdoorTexture = @"environment\watertrapdoor";

            var cRender = TDLComponentFactory.Render(trapdoorTexture, "onofftiles", "on");
            var cID = TDLComponentFactory.ID(mIDs);
            var cSwitch = TDLComponentFactory.Switch(cRender, mIsOff);
            var cIDSwitchAI = new TDCIDSwitchAI(cSwitch, cID);
            var cSpecialSquare = new TDCSpecialSquare(TDLPriorities.Trapdoor);
            var cTrapdoor = new TDCTrapdoor(mIsOnWater, mIsBroken, cSpecialSquare, cSwitch);

            if (mIsBroken) TDLMethods.AttachCrackedOverlay(cRender, 0);

            result.AddTags(TDLTags.GroundWalkable, TDLTags.Trapdoor);
            result.AddComponents(cRender, cID, cSwitch, cIDSwitchAI, cSpecialSquare, cTrapdoor);

            return result;
        }
コード例 #11
0
 public TDCWeaponSlot(TDCSpecialSquare mSpecialSquareComponent, TDCRender mRenderComponent)
 {
     _renderComponent = mRenderComponent;
     mSpecialSquareComponent.OnMoveToAllowed += SpecialSquareMove;
 }
コード例 #12
0
ファイル: TDLFactory.cs プロジェクト: SuperV1234/TimeDRODPOF
        public static Entity HotTile(int mTurnsToBurn = 2)
        {
            var result = new Entity(Tile) {UpdateOrder = TDLOrders.Trapdoor, Layer = TDLLayers.Trapdoor};

            var cRender = TDLComponentFactory.Render(@"environment\hottile", "doortiles", "single");
            var cRecalculateSprites = new TDCRecalculateSprites(TDLTags.HotTile, TDLRecalculations.RecalculateDoorSprite);
            var cSpecialSquare = new TDCSpecialSquare(TDLPriorities.Trapdoor);
            var cHotTile = new TDCHotTile(cSpecialSquare, mTurnsToBurn);

            result.AddTags(TDLTags.HotTile);
            result.AddComponents(cRender, cSpecialSquare, cRecalculateSprites, cHotTile);

            return result;
        }
コード例 #13
0
ファイル: TDLFactory.cs プロジェクト: SuperV1234/TimeDRODPOF
        public static Entity Oremites()
        {
            var result = new Entity(Tile) {Layer = TDLLayers.Trapdoor};

            var cRender = TDLComponentFactory.Render(@"environment\oremites", "doortiles", "single");
            var cRecalculateSprites = new TDCRecalculateSprites(TDLTags.Oremites, TDLRecalculations.RecalculateDoorSprite);
            var cSpecialSquare = new TDCSpecialSquare(TDLPriorities.Oremites);
            var cOremites = new TDCOremites(cSpecialSquare);

            result.AddTags(TDLTags.Oremites);
            result.AddComponents(cRender, cSpecialSquare, cOremites, cRecalculateSprites);

            return result;
        }
コード例 #14
0
ファイル: TDLFactory.cs プロジェクト: SuperV1234/TimeDRODPOF
        public static Entity OrthogonalSquare(bool mIsOff = false, List<int> mIDs = default(List<int>))
        {
            var result = new Entity(Tile) {Layer = TDLLayers.Arrow, UpdateOrder = TDLOrders.Trapdoor};

            var cRender = TDLComponentFactory.Render(@"environment\orthogonalsquare", "onofftiles", "on");
            var cSpecialSquare = new TDCSpecialSquare(TDLPriorities.Arrow);
            var cID = TDLComponentFactory.ID(mIDs);
            var cSwitch = TDLComponentFactory.Switch(cRender, mIsOff);
            var cIDSwitchAI = new TDCIDSwitchAI(cSwitch, cID);
            var cOrthogonalSquare = new TDCOrthogonalSquare(cSpecialSquare, cSwitch);

            result.AddTags(TDLTags.OrthogonalSquare);
            result.AddComponents(cRender, cSpecialSquare, cID, cSwitch, cIDSwitchAI, cOrthogonalSquare);

            return result;
        }
コード例 #15
0
ファイル: TDLFactory.cs プロジェクト: SuperV1234/TimeDRODPOF
        public static Entity Booster(int mDirection = 0, bool mIsOff = false, List<int> mIDs = default(List<int>))
        {
            var result = new Entity(Tile) {Layer = TDLLayers.Arrow};

            var cRender = TDLComponentFactory.Render(@"elements\booster", "onoffdirtiles", "on_n");
            var cDirection = new TDCDirection(mDirection);
            var cSpecialSquare = new TDCSpecialSquare(TDLPriorities.Trapdoor);
            var cID = TDLComponentFactory.ID(mIDs);
            var cSwitch = new TDCSwitch(cRender, mIsOff);
            cSwitch.SetOffTextureRect(Assets.GetTileset("onoffdirtiles").GetTextureRect("off_" + cDirection.DirectionString));
            cSwitch.SetOnTextureRect(Assets.GetTileset("onoffdirtiles").GetTextureRect("on_" + cDirection.DirectionString));
            var cIDSwitchAI = new TDCIDSwitchAI(cSwitch, cID);
            var cBooster = new TDCBooster(cDirection, cSwitch, cSpecialSquare);

            result.AddTags(TDLTags.Booster);
            result.AddComponents(cRender, cSpecialSquare, cDirection, cID, cSwitch, cIDSwitchAI, cBooster);

            return result;
        }
コード例 #16
0
ファイル: TDLFactory.cs プロジェクト: SuperV1234/TimeDRODPOF
        public static Entity WeaponSlot(bool mIsOff = false, List<int> mIDs = default(List<int>), string mWeapon = "")
        {
            var result = new Entity(Tile) {Layer = TDLLayers.Arrow, UpdateOrder = TDLOrders.Trapdoor};

            var cRender = TDLComponentFactory.Render(@"elements\weaponslot", "onofftiles", "on");
            var cSpecialSquare = new TDCSpecialSquare(TDLPriorities.Trapdoor);
            var cID = TDLComponentFactory.ID(mIDs);
            var cSwitch = TDLComponentFactory.Switch(cRender, mIsOff);
            var cIDSwitchAI = new TDCIDSwitchAI(cSwitch, cID);
            var cWeaponSlot = new TDCWeaponSlot(cSpecialSquare, cRender);

            cRender.AddBlankSprite();

            if (mWeapon == "reallybigsword") cWeaponSlot.Weapon = ReallyBigSword();
            else if (mWeapon == "shortsword") cWeaponSlot.Weapon = ShortSword();
            else if (mWeapon == "woodensword") cWeaponSlot.Weapon = WoodenSword();

            if (cWeaponSlot.Weapon != null) cWeaponSlot.Weapon.IsOutOfField = true;
            cWeaponSlot.RecalculateWeaponSprite();

            result.AddTags(TDLTags.WeaponSlot);
            result.AddComponents(cRender, cSpecialSquare, cID, cSwitch, cIDSwitchAI, cWeaponSlot);

            return result;
        }
コード例 #17
0
ファイル: TDLFactory.cs プロジェクト: SuperV1234/TimeDRODPOF
        public static Entity Tunnel(int mDirection = 0)
        {
            var result = new Entity(Tile) {Layer = TDLLayers.Arrow};

            var cRender = TDLComponentFactory.Render(@"elements\tunnel");
            var cDirection = new TDCDirection(mDirection);
            var cSpecialSquare = new TDCSpecialSquare(TDLPriorities.Trapdoor);
            var cTunnel = new TDCTunnel(cRender, cDirection, cSpecialSquare);

            result.AddTags(TDLTags.Tunnel, TDLTags.GroundPathmapObstacle);
            result.AddComponents(cRender, cSpecialSquare, cDirection, cTunnel);

            return result;
        }
コード例 #18
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;
        }