• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# Prop类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中Prop的典型用法代码示例。如果您正苦于以下问题:C# Prop类的具体用法?C# Prop怎么用?C# Prop使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



Prop类属于命名空间,在下文中一共展示了Prop类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: OnTouchGate

	public void OnTouchGate(Creature creature, Prop gate)
	{
		if (gate.State != "closed")
			return;

		var canOpen = creature.Keywords.Has("g1_36") || creature.Titles.IsUsable(BreakerTitle);
		var saturday = (ErinnTime.Now.Month == ErinnMonth.Samhain || IsEnabled("AllWeekBreaker"));

		if (!canOpen)
		{
			Send.Notice(creature, Localization.Get("You are unable to open the gate."));
		}
		else if (!saturday)
		{
			Send.Notice(creature, Localization.Get("The gate can only be opened on Samhain."));
		}
		else
		{
			creature.Titles.Enable(BreakerTitle);

			gate.SetState("open");

			var portal = gate.Region.GetProp(a => a.Info.Id == GatePortalPropId);
			portal.Extensions.Add(new ConfirmationPropExtension("portal(45360425219915779)", L("Would you like to go to the world across the Sealed door?")));
		}
	}
开发者ID:aura-project,项目名称:aura,代码行数:26,代码来源:g1_30_bangor_barri_dungeon.cs


示例2: Release

 /// <summary>
 /// Release the current prop.
 /// </summary>
 /// <returns>A reference to the released prop.</returns>
 public Prop Release()
 {
     Prop temp = this.CurrentProp;
     this.CurrentProp = null;
     this.current = null;
     return temp;
 }
开发者ID:fgeraci,项目名称:CS195-Core,代码行数:11,代码来源:PropHolder.cs


示例3: collidesWithProp

 public bool collidesWithProp(Prop prop,Rectangle rect)
 {
     if(prop.hitBox.Intersects(rect)){
         return true;
     }
     return false;
 }
开发者ID:mitjmcc,项目名称:DreamStateMachine,代码行数:7,代码来源:PhysicsController.cs


示例4: FixedUpdate

        void FixedUpdate()
        {
            fixedUpdateCalled = true;

            if (currentProp == lastProp) return;

            // Dropping current prop
            if (currentProp == null) {
                puppetMaster.RemoveMuscleRecursive(lastProp.muscle, true);
                lastProp.Drop();
            }

            // Picking up to an empty slot
            if (lastProp == null) {
                AttachProp(currentProp);
            }

            // Switching props
            if (lastProp != null && currentProp != null) {
                puppetMaster.RemoveMuscleRecursive(lastProp.muscle, true);
                AttachProp(currentProp);
            }

            lastProp = currentProp;
        }
开发者ID:cupsster,项目名称:ExtremeBusiness,代码行数:25,代码来源:PropRoot.cs


示例5: defAllProp

        //---------------------------------------------------------------------
        public override void defAllProp(Dictionary<string, string> map_param)
        {
            EffectMgr = new EffectMgr();

            mPropIsBot = defProp<bool>(map_param, "IsBot", false);
            mPropAccountId = defProp<string>(map_param, "AccountId", "");
            mPropAccountName = defProp<string>(map_param, "AccountName", "");
            mPropActorId = defProp<ulong>(map_param, "ActorId", 0);
            mPropNickName = defProp<string>(map_param, "NickName", "");
            mPropIcon = defProp<string>(map_param, "Icon", "");
            mPropIpAddress = defProp<string>(map_param, "IpAddress", "");
            mPropGender = defProp<bool>(map_param, "Gender", false);
            mPropIndividualSignature = defProp<string>(map_param, "IndividualSignature", "这家伙很懒,什么也没留下!");
            mPropLevel = defProp<int>(map_param, "Level", 1);
            mPropExperience = defProp<int>(map_param, "Experience", 0);
            PropGold = defProp<int>(map_param, "Gold", 100);
            mPropProfileSkinTableId = defProp<int>(map_param, "ProfileSkinTableId", 1);
            mPropIsVIP = defProp<bool>(map_param, "IsVIP", false);
            mPropVIPDataTime = defProp<DateTime>(map_param, "VIPDataTime", DateTime.Now);
            mPropVIPPoint = defProp<int>(map_param, "VIPPoint", 0);
            mPropGameTotal = defProp<int>(map_param, "GameTotal", 0);
            mPropGameWin = defProp<int>(map_param, "GameWin", 0);
            mPropJoinDateTime = defProp<DateTime>(map_param, "JoinDataTime", DateTime.Now);
            mPropLastOnlineDateTime = defProp<DateTime>(map_param, "LastOnlineDateTime", DateTime.Now);
            mPropIsAFK = defProp<bool>(map_param, "IsAFK", false);
        }
开发者ID:yinlei,项目名称:Fishing,代码行数:27,代码来源:DefActor.cs


示例6: CreatePropInfo

    private Prop CreatePropInfo(FileInfo file)
    {
        string[] cfgData = File.ReadAllLines(file.FullName);

        if (cfgData == null || cfgData.Length == 0)
        {
            Debug.Log("Config data for prop '" + file.Directory.Name + "' is null or has zero length");
            return null;
        }

        Prop newProp = new Prop(file.DirectoryName, file.Directory.Name);

        foreach (string cfgLine in cfgData)
        {
            string cfg = cfgLine.Trim(charTrim).ToLower();

            if (cfg.StartsWith("proxy"))
            {
                Proxy newProxy = CreateProxyInfo(file.Directory.Name, cfg);

                if (newProxy != null)
                    newProp.proxies.Add(newProxy);
            }
        }

        if (newProp.proxies.Count == 0)
        {
            Debug.Log("Config data for prop '" + file.Directory.Name + "' contains no usable proxies and is therefore invalid");
            return null;
        }

        return newProp;
    }
开发者ID:gamers2000,项目名称:kspcss,代码行数:33,代码来源:PropTools.cs


示例7: defAllProp

        public Prop<string> mPropPrefab; // Prefab

        #endregion Fields

        #region Methods

        //---------------------------------------------------------------------
        public override void defAllProp(Dictionary<string, string> map_param)
        {
            mPropPlayerTableId = defProp<int>(map_param, "PlayerTableId", 1);
            mPropNickName = defProp<string>(map_param, "NickName", "");
            mPropIcon = defProp<string>(map_param, "Icon", "");
            mPropPrefab = defProp<string>(map_param, "Prefab", "");
            mPropLevel = defProp<int>(map_param, "Level", 1);
        }
开发者ID:yinlei,项目名称:Fishing,代码行数:15,代码来源:DefPlayerMirror.cs


示例8: CreateWoodWall

        public static Prop CreateWoodWall()
        {
            Prop woodWall = new Prop("wood_wall_bmp");
            woodWall.Passable = false;
            woodWall.Durability = 50;

            return woodWall;
        }
开发者ID:kjchiu,项目名称:zomgame-2,代码行数:8,代码来源:PropFactory.cs


示例9: PropMatches_TakesSizeIntoAccount

        public void PropMatches_TakesSizeIntoAccount()
        {
            var prop1 = new Prop { ColumnName = "Col", SqlDbType = SqlDbType.VarChar, Size = "100" };
            var prop2 = new Prop { ColumnName = "Col", SqlDbType = SqlDbType.VarChar, Size = "101" };

            var matches = prop1.Matches(prop2);

            Assert.IsFalse(matches);
        }
开发者ID:irium,项目名称:Cirqus,代码行数:9,代码来源:TestSchemaHelper.cs


示例10: CreateDestroyPropEvent

        public static DestroyPropEvent CreateDestroyPropEvent(Prop nProp)
        {
            DestroyPropEvent dEvent = new DestroyPropEvent(nProp);

            dEvent.CreateTime = Game.TurnsPassed;
            dEvent.ActivateTime = Game.TurnsPassed + 0;

            return dEvent;
        }
开发者ID:kjchiu,项目名称:zomgame-2,代码行数:9,代码来源:EventFactory.cs


示例11: Check

    public override bool Check(Creature creature, Prop prop)
    {
        return false;

        // Wand
        if (creature.RightHand != null && creature.RightHand.Info.Id >= 40038 && creature.RightHand.Info.Id <= 40041)
            return true;

        return false;
    }
开发者ID:pie3467,项目名称:aura,代码行数:10,代码来源:sealstones.cs


示例12: CreateAttackPropEvent

        public static AttackPropEvent CreateAttackPropEvent(Creature nAtt, Prop nDef)
        {
            AttackPropEvent aEvent = new AttackPropEvent(nAtt, nDef);

            aEvent.CreateTime = Game.TurnsPassed;
            aEvent.ActivateTime = Game.TurnsPassed + 1;

            nAtt.State = Creature.EntityState.BUSY;

            return aEvent;
        }
开发者ID:kjchiu,项目名称:zomgame-2,代码行数:11,代码来源:EventFactory.cs


示例13: Attach

    /// <summary>
    /// Attach the given prop. If a prop already exists, it is replaced.
    /// </summary>
    public void Attach(Prop prop)
    {
        this.CurrentProp = prop;
        this.current = this.transform;

        foreach (PropAttachment attachment in this.Attachments)
        {
            if (prop.PropType == attachment.PropType)
                this.current = attachment.SnapPoint;
        }
    }
开发者ID:fgeraci,项目名称:CS195-Core,代码行数:14,代码来源:PropHolder.cs


示例14: OnPropEvent

	public override void OnPropEvent(Puzzle puzzle, Prop prop)
	{
		var chest = prop as Chest;
		if (chest != null && chest.Name == "KeyChest" && !puzzle.Get("ChestOpen"))
		{
			puzzle.Set("ChestOpen", true);

			var chestPlace = puzzle.GetPlace("ChestPlace");
			chestPlace.CloseAllDoors();
			chestPlace.SpawnSingleMob("SingleMob1");
		}
	}
开发者ID:tkiapril,项目名称:aura,代码行数:12,代码来源:entrance_puzzle.cs


示例15: AttachProp

        private void AttachProp(Prop prop)
        {
            prop.transform.position = transform.position;
            prop.transform.rotation = transform.rotation;

            prop.PickUp(this);
            puppetMaster.AddMuscle(prop.muscle, prop.transform, connectTo, transform, prop.muscleProps);

            if (prop.additionalPin != null && prop.additionalPinTarget != null) {
                puppetMaster.AddMuscle(prop.additionalPin, prop.additionalPinTarget, prop.muscle.GetComponent<Rigidbody>(), prop.transform, new Muscle.Props(prop.additionalPinWeight, 0f, 0f, 0f, false, Muscle.Group.Prop));
            }
        }
开发者ID:cupsster,项目名称:ExtremeBusiness,代码行数:12,代码来源:PropRoot.cs


示例16: defAllProp

        public Prop<int> PropGold; // 金币

        #endregion Fields

        #region Methods

        //---------------------------------------------------------------------
        public override void defAllProp(Dictionary<string, string> map_param)
        {
            PropActorIdInDesktop = defProp<byte>(map_param, "PropActorIdInDesktop", 0, false);
            mPropActorId = defProp<ulong>(map_param, "ActorId", 0, false);
            mPropIsBot = defProp<bool>(map_param, "IsBot", false);
            mPropNickName = defProp<string>(map_param, "NickName", "");
            mPropIcon = defProp<string>(map_param, "Icon", "");
            mPropIpAddress = defProp<string>(map_param, "IpAddress", "");
            PropGold = defProp<int>(map_param, "Gold", 0);
            mPropCurrentGiftEtGuid = defProp<string>(map_param, "CurrentGiftEtGuid", "");
            mPropWaitWhileTime = defProp<float>(map_param, "WaitWhileTime", 60f);
        }
开发者ID:yinlei,项目名称:Fishing,代码行数:19,代码来源:DefActorMirror.cs


示例17: OnPropEvent

	public override void OnPropEvent(Puzzle puzzle, Prop prop)
	{
		var Switch = prop as Switch;
		if (Switch == null)
			return;

		if (puzzle.Get("activated"))
			return;

		var lockedPlace = puzzle.GetPlace("LockedPlace");
		lockedPlace.Open();

		puzzle.Set("activated", true);
	}
开发者ID:aura-project,项目名称:aura,代码行数:14,代码来源:rp_giantspider2.cs


示例18: SpawnGate

	private void SpawnGate(Dungeon dungeon)
	{
		var region = dungeon.Regions.Last();
		var endLocation = dungeon.GetEndRoomCenter();
		var direction = MabiMath.DirectionToRadian(0, -1);

		var gate = new Prop(GatePropId, endLocation.RegionId, endLocation.X, endLocation.Y, direction);
		gate.Info.Color2 = 0xffffffff;
		gate.Behavior = OnTouchGate;
		region.AddProp(gate);

		var portal = new Prop(GatePortalPropId, endLocation.RegionId, endLocation.X, endLocation.Y, direction);
		portal.Behavior = OnTouchPortal;
		region.AddProp(portal);
	}
开发者ID:aura-project,项目名称:aura,代码行数:15,代码来源:g1_30_bangor_barri_dungeon.cs


示例19: OnOrbHit

	private void OnOrbHit(Creature creature, Prop prop)
	{
		if (prop.State == "off")
		{
			var hits = prop.Vars.Temp.Get("orbHit", 0) + 1;
			prop.Vars.Temp["orbHit"] = hits;

			if (hits == OrbHits)
			{
				Send.Notice(creature, L("You broke the seal and received the Black Orb Fragment!\nCollect all four to receive the Black Orb."));

				prop.SetState("on");
				new Item(FragmentId).Drop(prop.Region, prop.GetPosition(), 50);
			}
		}
	}
开发者ID:aura-project,项目名称:aura,代码行数:16,代码来源:g1_37_red_tirnanog_dungeon.cs


示例20: OnPropEvent

	public override void OnPropEvent(Puzzle puzzle, Prop prop)
	{
		var chest = prop as LockedChest;
		if (chest == null || puzzle.Get(chest.Name + "Open") || !chest.IsOpen)
			return;

		puzzle.Set(chest.Name + "Open", true);

		if (puzzle.Get(chest.Name + "Monster"))
		{
			var place = puzzle.GetPlace("Place");
			place.CloseAllDoors();
			place.SpawnSingleMob(chest.Name + "Mob", "Mob" + puzzle.Get("MonsterI"));
			puzzle.Set("MonsterI", puzzle.Get("MonsterI") + 1);
		}
	}
开发者ID:xKamuna,项目名称:aura,代码行数:16,代码来源:keychest_9chest.cs



注:本文中的Prop类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# PropDef类代码示例发布时间:2022-05-24
下一篇:
C# Promise类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap