本文整理汇总了C#中Prop类的典型用法代码示例。如果您正苦于以下问题:C# Prop类的具体用法?C# Prop怎么用?C# Prop使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Prop类属于命名空间,在下文中一共展示了Prop类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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?")));
}
}
示例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;
}
示例3: collidesWithProp
public bool collidesWithProp(Prop prop,Rectangle rect)
{
if(prop.hitBox.Intersects(rect)){
return true;
}
return false;
}
示例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;
}
示例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);
}
示例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;
}
示例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);
}
示例8: CreateWoodWall
public static Prop CreateWoodWall()
{
Prop woodWall = new Prop("wood_wall_bmp");
woodWall.Passable = false;
woodWall.Durability = 50;
return woodWall;
}
示例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);
}
示例10: CreateDestroyPropEvent
public static DestroyPropEvent CreateDestroyPropEvent(Prop nProp)
{
DestroyPropEvent dEvent = new DestroyPropEvent(nProp);
dEvent.CreateTime = Game.TurnsPassed;
dEvent.ActivateTime = Game.TurnsPassed + 0;
return dEvent;
}
示例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;
}
示例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;
}
示例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;
}
}
示例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");
}
}
示例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));
}
}