当前位置: 首页>>代码示例>>C#>>正文


C# Character.getName方法代码示例

本文整理汇总了C#中Character.getName方法的典型用法代码示例。如果您正苦于以下问题:C# Character.getName方法的具体用法?C# Character.getName怎么用?C# Character.getName使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Character的用法示例。


在下文中一共展示了Character.getName方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Character

 public Character(Character c) //string c_name, string c_whole, string[] c_paths, int c_index)
 {
     name = c.getName();
     paths = c.getParts();// c_paths;
     index = c.getIndex();// c_index;
     whole = c.getWhole();
     offsetList = c.getOffsetList();
 }
开发者ID:cattron313,项目名称:CS194W,代码行数:8,代码来源:Character.cs

示例2: loadCharacterParts

 public void loadCharacterParts(Character character)
 {
     curCharImages = new List<Image>();
     for (int i = 0; i < 22; i++)
     {
         if (character == null)
             break;
         if (CharacterList.getCharacter(character.getName()).getPart(i).Equals(""))
         {
             curCharImages.Add(null);
             continue;
         }
         Image img = new Image();
         string charPath = "c:\\users\\tajah\\documents\\visual studio 2010\\Projects\\WpfApplication2\\WpfApplication2\\" + character.getPart(i);
         img.Source = new BitmapImage(new Uri(charPath, UriKind.Absolute));
         img.Name = "character" + i.ToString() + character.getName();
         Console.WriteLine(img.Name);
         Canvas.SetTop(img, main.ActualHeight * .15);
         Canvas.SetLeft(img, main.ActualWidth * .25);
         this.main.Children.Add(img);
         curCharImages.Add(img);
         //currentCharName = character.getName();
     }
 }
开发者ID:cattron313,项目名称:CS194W,代码行数:24,代码来源:Page4.xaml.cs

示例3: CharacterData

    public CharacterData(Character c, Action a)
    {
        //controlled
        scene = c.getScene();
        slot = c.getSlot();
        world = c.getWorld();
        levelUpsAvailable = c.getLevelUpsAvailable();
        experience = c.getExperience();
        hitDie = c.getHitDie();

        //!controlled
        expGive = c.getExpGive();
        friendly = c.getFriendly();
        talk = c.getTalk();

        //character
        race = c.getRace();
        alignment = c.getAlignment();
        affiliation = c.getAffiliation();
        profession = c.getProfession();
        title = c.getTitle();
        characterClass1 = c.getCharacterClass1();
        characterClass2 = c.getCharacterClass2();
        prestigeClass = c.getPrestigeClass();
        controlled = c.getControlled();

        //entity
        name = c.getName();
        level1 = c.getLevel1();
        level2 = c.getLevel2();
        prestigeLevel = c.getPrestigeLevel();
        totalLevel = c.getTotalLevel();
        strength = c.getStrength();
        dexterity = c.getDexterity();
        constitution = c.getConstitution();
        intelligence = c.getIntelligence();
        wisdom = c.getWisdom();
        charisma = c.getCharisma();
        initiativeBonus = c.getInitiativeBonus();
        hostile = c.getHostile();
        initSet = c.getInitSet();
        turn = c.getTurn();
        done = c.getDone();
        initiative = c.getInitiative();
        basicAttackBonus = c.getBasicAttackBonus();
        fortitude = c.getFortitude();
        reflex = c.getReflex();
        will = c.getWill();
        skill = c.getSkill();
        feat = c.getFeat();
        skillPoints = c.getSkillPoints();
        featPoints = c.getFeatPoints();
        classSkill = c.getClassSkill();
        xLocation = c.getXLocation();
        yLocation = c.getYLocation();
        xDirection = c.getXDirection();
        yDirection = c.getYDirection();
        inventory = c.getInventory();
        status = c.getStatus();

        //attackable
        currentHealth = c.getCurrentHealth();
        maxHealth = c.getMaxHealth();
        armorClass = c.getArmorClass();
        prefabName = c.getPrefabName();

        //action
        standardAction = a.getStandardAction();
        moveAction = a.getMoveAction();
        freeAction = a.getFreeAction();
        swiftAction = a.getSwiftAction();
        immediateAction = a.getImmediateAction();
        aoo = a.getAoo();
        currentSpeed = a.getCurrentSpeed();
        maxSpeed = a.getMaxSpeed();
        moveLock = a.getMoveLock();
        aooProvoked = a.getAooProvoked();
        xEnd = a.getXEnd();
        yEnd = a.getYEnd();
        xDir = a.getXDir();
        yDir = a.getYDir();
    }
开发者ID:TheAlchemistStudio,项目名称:DnD,代码行数:82,代码来源:CharacterData.cs

示例4: sendTo3x3AreaSpawn

 public void sendTo3x3AreaSpawn(Character character, Area area, Boolean just_a_refresh_for_the_world = false)
 {
     if(!this.areaExists(area)) return;
     character.removeInnitedAreas();
     for (int i =0; i < 3; i++) {
         for (int u =0; u < 3; u++) {
             Area nearCentral = getArea(new int[] { area.getAreaPosition()[0]-1+i, area.getAreaPosition()[1]-1+u });
             if(nearCentral == null) continue;
             if(!just_a_refresh_for_the_world) nearCentral.sendAreaInit(character);
             foreach(Character characterAround in nearCentral.getCharacters()) {
                 if(characterAround == character) continue;
                 try {
                     Console.WriteLine("AreaSpawn> extCharPacket from: {0} for {1}", character.getName(), characterAround.getName());
                     characterAround.getAccount().mClient.WriteRawPacket(CharacterPackets.extCharPacket(character));
                 }
                 catch(Exception e) {
                     Console.WriteLine(e);
                 }
             }
             character.addInnitedArea(nearCentral.getaID());
             WMap.Instance.addToSynchronizedAreas(area);
         }
     }
 }
开发者ID:cjs3187607,项目名称:brightmh,代码行数:24,代码来源:Grid.cs

示例5: sendTo3x3AreaMovement

 public void sendTo3x3AreaMovement(Character character, Area area, byte[] packet)
 {
     if(!this.areaExists(area)) return;
     List<int> relistInnitedAreas = new List<int>();
     for (int i =0; i < 3; i++) {
         for (int u =0; u < 3; u++) {
             Area nearCentral = getArea(new int[] { area.getAreaPosition()[0]-1+i, area.getAreaPosition()[1]-1+u });
             if(nearCentral == null) continue;
             foreach(Character characterAround in nearCentral.getCharacters()) {
                 if(characterAround == character)
                     continue;
                 if(!character.getInnitedAreas().Contains(nearCentral.getaID()))
                 {
                     characterAround.getAccount().mClient.WriteRawPacket(CharacterPackets.extCharPacket(character));
                 }
                 try {
                     Console.WriteLine("AreaMove> Packet sent for {0} from {1}", characterAround.getName(), character.getName());
                     characterAround.getAccount().mClient.WriteRawPacket(packet);
                 }
                 catch(Exception e) {
                     Console.WriteLine(e);
                 }
             }
             if(character.getInnitedAreas().Contains(nearCentral.getaID()))
             {
                 relistInnitedAreas.Add(nearCentral.getaID());
                 continue;
             }
             nearCentral.sendAreaInit(character);
             relistInnitedAreas.Add(nearCentral.getaID());
         }
     }
     character.removeInnitedAreas();
     character.setInnitedAreas(relistInnitedAreas);
 }
开发者ID:cjs3187607,项目名称:brightmh,代码行数:35,代码来源:Grid.cs

示例6: sendTo3x3AreaLeave

 public void sendTo3x3AreaLeave(Character character, Area area)
 {
     if(!this.areaExists(area)) return;
     for (int i =0; i < 3; i++) {
         for (int u =0; u < 3; u++) {
             Area nearCentral = getArea(new int[] { area.getAreaPosition()[0]-1+i, area.getAreaPosition()[1]-1+u });
             if(nearCentral == null) continue;
             foreach(Character characterAround in nearCentral.getCharacters()) {
                 if(characterAround == character) continue;
                 try {
                     Console.WriteLine("AreaLeave> vanPacket from: {0} for {1}", character.getName(), characterAround.getName());
                     characterAround.getAccount().mClient.WriteRawPacket(CharacterPackets.vanCharPacket(character));
                 } catch (Exception e) { Console.WriteLine(e); }
             }
         }
     }
     character.getArea().removeCharacter(character);
     character.removeInnitedAreas();
     WMap.Instance.removeFromSynchronizedAreas(area);
 }
开发者ID:cjs3187607,项目名称:brightmh,代码行数:20,代码来源:Grid.cs

示例7: sendTo3x3Area

 public void sendTo3x3Area(Character character, Area area, byte[] packet)
 {
     if(!this.areaExists(area)) return;
     for (int i =0; i < 3; i++) {
         for (int u =0; u < 3; u++) {
             Area nearCentral = getArea(new int[] { area.getAreaPosition()[0]-1+i, area.getAreaPosition()[1]-1+u });
             if(nearCentral == null) continue;
             foreach(Character characterAround in nearCentral.getCharacters()) {
                 if(characterAround == character) continue;
                 try {
                     Console.WriteLine("Area> Packet sent for {0} from {1}", characterAround.getName(), character.getName());
                     characterAround.getAccount().mClient.WriteRawPacket(packet);
                 } catch (Exception e) { Console.WriteLine(e); }
             }
         }
     }
 }
开发者ID:cjs3187607,项目名称:brightmh,代码行数:17,代码来源:Grid.cs

示例8: sendAreaInit

 public void sendAreaInit(Character character)
 {
     MartialClient connection = character.getAccount().mClient;
     if (character.getInnitedAreas().Contains(this.aID)) return;
     foreach(Character aCharacter in areaCharacters) {
         if(aCharacter == character) continue;
         try {
             Console.WriteLine("AreaInt> Packet sent for {0} from {1}", character.getName(), aCharacter.getName());
             connection.WriteRawPacket(CharacterPackets.extCharPacket(aCharacter));
         } catch(Exception e) { Console.WriteLine(e); }
     }
     foreach (NPC aNPC in npcs) {
         try {
             connection.WriteRawPacket(aNPC.npcSpawn(character));
         } catch (Exception e) { Console.WriteLine(e); }
     }
     foreach(Mob aMob in mobs) {
         try {
             connection.WriteRawPacket(aMob.getInitialPacket());
         } catch(Exception e) { Console.WriteLine(e); }
     }
 }
开发者ID:cjs3187607,项目名称:brightmh,代码行数:22,代码来源:Area.cs


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