本文整理汇总了C#中Objects类的典型用法代码示例。如果您正苦于以下问题:C# Objects类的具体用法?C# Objects怎么用?C# Objects使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Objects类属于命名空间,在下文中一共展示了Objects类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Send
public static bool Send(Objects.Client client, uint creatureId, string creatureName)
{
RemoveCreatureTextPacket p = new RemoveCreatureTextPacket(client);
p.CreatureId = creatureId;
p.CreatureName = creatureName;
return p.Send();
}
示例2: SaveEl_2
public static void SaveEl_2(El_2 e, int objId, NPLabDbContext db)
{
Database.SetInitializer(new MigrateDatabaseToLatestVersion<NPLabDbContext, Configuration>());
currObj = (from p in db.Object
where p.Id == objId
select p).FirstOrDefault();
//e.Object = currObj;
//.ObjectsId = currObj.Id;
currObj.El_2.Add(e);
db.Entry(e).State = System.Data.Entity.EntityState.Added;
foreach (Sectors sec in e.ListOfSectors)
{
db.Entry(sec).State = System.Data.Entity.EntityState.Added;
foreach (Floors f in sec.ListOfFloors)
{
db.Entry(f).State = System.Data.Entity.EntityState.Added;
foreach (Rooms r in f.ListOfRooms)
{
db.Entry(r).State = System.Data.Entity.EntityState.Added;
foreach (Installations inst in r.ListOfInstallations) db.Entry(inst).State = System.Data.Entity.EntityState.Added;
}
}
}
db.SaveChanges();
}
示例3: Main
/// <summary>
/// Main Method.
/// </summary>
public static void Main()
{
Objects obj1 = new Objects("gosho", 1);
Console.WriteLine(obj1.ToString());
// TODO : add == and != operator
}
示例4: checkDistance
private bool checkDistance(Objects obj)
{
bool isInRange = true;
Vector3 distanceToCheck;
switch (obj)
{
case Objects.Start:
distanceToCheck = startPosition;
break;
case Objects.End:
distanceToCheck = endPosition;
break;
// This default block is just for the compiler. It shouldn't execute ever.
default:
distanceToCheck = startPosition;
break;
}
// Check x and y distance to the object.
float xDistance = 0, yDistance = 0;
xDistance = sphere.transform.position.x - distanceToCheck.x;
yDistance = sphere.transform.position.y - distanceToCheck.y;
if (Mathf.Abs(xDistance) > distanceDelta || Mathf.Abs(yDistance) > distanceDelta)
{
isInRange = false;
}
return isInRange;
}
示例5: Send
public static bool Send(Objects.Client client, byte slot, Objects.Item item)
{
InventorySetSlotPacket p = new InventorySetSlotPacket(client);
p.Slot = slot;
p.Item = item;
return p.Send();
}
示例6: MovePacket
public MovePacket(Objects.Client c, Constants.Direction direction)
: base(c)
{
Direction = direction;
switch (direction)
{
case Tibia.Constants.Direction.Down:
Type = OutgoingPacketType.MoveDown;
break;
case Tibia.Constants.Direction.Up:
Type = OutgoingPacketType.MoveUp;
break;
case Tibia.Constants.Direction.Right:
Type = OutgoingPacketType.MoveRight;
break;
case Tibia.Constants.Direction.Left:
Type = OutgoingPacketType.MoveLeft;
break;
case Tibia.Constants.Direction.DownLeft:
Type = OutgoingPacketType.MoveDownLeft;
break;
case Tibia.Constants.Direction.DownRight:
Type = OutgoingPacketType.MoveDownRight;
break;
case Tibia.Constants.Direction.UpLeft:
Type = OutgoingPacketType.MoveUpLeft;
break;
case Tibia.Constants.Direction.UpRight:
Type = OutgoingPacketType.MoveUpRight;
break;
}
Destination = PacketDestination.Server;
}
示例7: Send
public static bool Send(Objects.Client client, ChatChannel channel, string name)
{
ChannelOpenPacket p = new ChannelOpenPacket(client);
p.ChannelId = channel;
p.ChannelName = name;
return p.Send();
}
示例8: GetAll
public static ObjectsCollection GetAll() {
resourceSchema.Dal.Objects dbo = null;
try {
dbo = new resourceSchema.Dal.Objects();
System.Data.DataSet ds = dbo.Objects_Select_All();
ObjectsCollection collection = new ObjectsCollection();
if (GlobalTools.IsSafeDataSet(ds)) {
for (int i = 0; (i < ds.Tables[0].Rows.Count); i = (i + 1)) {
Objects obj = new Objects();
obj.Fill(ds.Tables[0].Rows[i]);
if ((obj != null)) {
collection.Add(obj);
}
}
}
return collection;
}
catch (System.Exception ) {
throw;
}
finally {
if ((dbo != null)) {
dbo.Dispose();
}
}
}
示例9: LoadPanes
void LoadPanes()
{
IOptionPane general = new General();
panes.Add(general);
IOptionPane objects = new Objects();
panes.Add(objects);
}
示例10: Send
public static bool Send(Objects.Client client, uint creatureId, SquareColor color)
{
CreatureSquarePacket p = new CreatureSquarePacket(client);
p.CreatureId = creatureId;
p.Color = color;
return p.Send();
}
示例11: Send
public static bool Send(Objects.Client client, uint playerId, string playerName, byte state)
{
VipStatePacket p = new VipStatePacket(client);
p.PlayerId = playerId;
p.PlayerName = playerName;
p.PlayerState = state;
return p.Send();
}
示例12: Send
public static bool Send(Objects.Client client, uint iconId)
{
RemoveIconPacket p = new RemoveIconPacket(client);
p.IconId = iconId;
return p.Send();
}
示例13: Send
public static bool Send(Objects.Client client, Objects.Location position, ushort spriteId, byte stackPosition)
{
LookAtPacket p = new LookAtPacket(client);
p.Location = position;
p.SpriteId = spriteId;
p.StackPosition = stackPosition;
return p.Send();
}
示例14: Send
public static bool Send(Objects.Client client, byte fightMode, byte chaseMode, byte safeMode)
{
FightModesPacket p = new FightModesPacket(client);
p.FightMode = fightMode;
p.ChaseMode = chaseMode;
p.SafeMode = safeMode;
return p.Send();
}
示例15: Send
public static bool Send(Objects.Client client, uint skinId)
{
RemoveSkinPacket p = new RemoveSkinPacket(client);
p.SkinId = skinId;
return p.Send();
}