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


C# CharacterStats类代码示例

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


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

示例1: handleInput

    public override ControllState handleInput(BThirdPerson controller, CharacterStats stats)
    {
        if(controller.stateTime > 5.625){

        }
        return this;
    }
开发者ID:FabianSchempp,项目名称:DUNDON,代码行数:7,代码来源:ControllStateCrow.cs

示例2: mod_SetButtonsAnticlassSpells

        public void mod_SetButtonsAnticlassSpells(CharacterStats stats)
        {
            this.Label = null;
            int num = 0;
            foreach (GenericAbility current in stats.Abilities)
            {
                if (current is GenericSpell)
                {
                    CharacterStats.Class spellClass = ((GenericSpell)current).SpellClass;
                    if (spellClass != stats.CharacterClass || !CharacterStats.IsPlayableClass(spellClass))
                    {

                        if ((stats.CharacterClass == CharacterStats.Class.Wizard ||
                            stats.CharacterClass == CharacterStats.Class.Priest ||
                            stats.CharacterClass == CharacterStats.Class.Druid ||
                            stats.CharacterClass == CharacterStats.Class.Chanter ||
                            stats.CharacterClass == CharacterStats.Class.Cipher) && IEModOptions.HideAnticlassSpells)
                        {

                        }

                        else
                        {
                            this.SetButton(num, current.gameObject, UIAbilityBarButtonSet.AbilityButtonAction.CAST_SPELL_ABILITY, current.Icon);
                            num++;
                        }
                    }
                }
            }
            this.HideButtons(num);
            this.m_DoRefresh = true;
        }
开发者ID:tjayharvey,项目名称:IEMod.pw,代码行数:32,代码来源:mod_UIAbilityBarButtonSet.cs

示例3: Start

 public virtual void Start()
 {
     characterStats = gameObject.GetCharacterStats();
     inventory = gameObject.GetInventory();
     playerMotor = gameObject.GetPlayerMotor();
     characterStats.Died += characterStats_Died;
 }
开发者ID:BrendanMulcahy,项目名称:IronStrife,代码行数:7,代码来源:DamageReceiver.cs

示例4: Start

 // Use this for initialization
 void Start()
 {
     P1 = GameObject.FindGameObjectWithTag("Player1");
     P2 = GameObject.FindGameObjectWithTag ("Player2");
     playerHealth1 = P1.GetComponent<CharacterStats> ();
     playerHealth2 = P2.GetComponent<CharacterStats> ();
 }
开发者ID:JELGT2011,项目名称:Wizards-Of-Dos,代码行数:8,代码来源:TriggerPoints.cs

示例5: handleInput

    public override ControllState handleInput(BThirdPerson controller, CharacterStats stats)
    {
        Vector3 mousePoint = Vector3.zero;
        stats.healthRegenerationRate = 0f;
        stats.enduranceRegenerationRate = 0f;

        if(controller.stateTime < 0.1){
            controller.turnToReferenceObject();
            controller.controller.slotRightHand.GetComponent<OWeapon>().enable();
            shot = false;
        }

        if(Random.Range(1,10) < 3){
            shot = true;
        }

        if(controller.stateTime > 0.22f){
            if(shot){
                return ControllerZombie._ZombieATTACKB;
            }
            else{
                controller.controller.slotRightHand.GetComponent<OWeapon>().disable();
                return ControllerZombie._ZombieIDLE;
            }
        }

        return this;
    }
开发者ID:FabianSchempp,项目名称:DUNDON,代码行数:28,代码来源:ControllStateZombie.cs

示例6: Slime

    public static Character Slime()
    {
        var character = new Character();

        var baseStats = new CharacterStats();
        baseStats.SetStat(Const.Stats.MaxHp, 700d);
        baseStats.SetStat(Const.Stats.MaxMp, 150d);
        baseStats.SetStat(Const.Stats.Attack, 300d);
        baseStats.SetStat(Const.Stats.Defense, 150d);
        baseStats.SetStat(Const.Stats.Wisdom, 70d);
        baseStats.SetStat(Const.Stats.Agility, 100d);
        baseStats.SetStat(Const.Stats.Mind, 50d);
        baseStats.SetStat(Const.Stats.Critical, 0.05d);
        baseStats.SetStat(Const.Stats.Accuracy, 0.8d);
        baseStats.SetStat(Const.Stats.Evasion, 0.1d);

        character.Name = "Slime";
        character.BaseStats = baseStats;

        character.PortraitPath = "Characters/Slime/portrait";
        character.ModelPath = "Characters/Slime/model";
        character.AttackDistance = 2.5f;
        character.SizeOffset = 1.5f;
        character.Skills.Add(Skill.MeleeAttack());
        character.Movement = 2;

        character.PatternShape = Pattern.Single();

        return character;
    }
开发者ID:sucineri,项目名称:Battle-Project,代码行数:30,代码来源:Character.cs

示例7: handleInput

    public override ControllState handleInput(BThirdPerson controller, CharacterStats stats)
    {
        Vector3 mousePoint = Vector3.zero;
        stats.healthRegenerationRate = 0f;
        stats.enduranceRegenerationRate = 0f;

        if(controller.stateTime < 0.1){
            controller.controller.slotRightHand.GetComponent<OWeapon>().enable();
            shot = false;
            Vector2 inputVector = new Vector2(Input.GetAxis("Horizontal"),Input.GetAxis("Vertical"));
            Vector3 inputVectorTransformed = new Vector3(inputVector.x,0,-inputVector.y);
            Vector3 lookTarget = controller.position + (ControllerCamera.hingeUp.transform.rotation*inputVectorTransformed);
            controller.turn(lookTarget);
        }

        if(Input.GetButtonDown("attack") && stats.reduceEndurance(7) && !shot){
            shot = true;
        }

        if(controller.stateTime > 0.22f){
            if(shot){
                return ControllerKnight._KnightATTACKB;
            }
            else{
                controller.controller.slotRightHand.GetComponent<OWeapon>().disable();
                return ControllerKnight._KnightIDLE;
            }
        }

        return this;
    }
开发者ID:FabianSchempp,项目名称:DUNDON,代码行数:31,代码来源:ControllStateKnight.cs

示例8: Awake

 void Awake()
 {
     anim = GetComponent<Animator>();
     cc = this.GetComponent<CharacterController>();
     car = GetComponent<CharacterStats>();
     shot = GetComponent<Shooting>();
 }
开发者ID:Torppo,项目名称:IntramuralRPG,代码行数:7,代码来源:PlayerMovement.cs

示例9: mod_ShowOnSpellBar

        public static bool mod_ShowOnSpellBar(GenericAbility ability, CharacterStats stats, int spellLevel)
        {
            if (ability.Passive)
            {
                return false;
            }
            GenericSpell genericSpell = ability as GenericSpell;
            GenericCipherAbility genericCipherAbility = ability as GenericCipherAbility;
            if (!genericSpell)
            {
                return genericCipherAbility && (spellLevel <= 0 || genericCipherAbility.SpellLevel == spellLevel);
            }

            if (genericSpell.SpellClass != stats.CharacterClass && spellLevel > 0 && genericSpell.SpellLevel == spellLevel && IEModOptions.HideAnticlassSpells)
            {
                return true;
            }

            if (genericSpell.SpellClass != stats.CharacterClass || (spellLevel > 0 && genericSpell.SpellLevel != spellLevel))
            {
                return false;
            }
            if (stats.CharacterClass != CharacterStats.Class.Wizard || !genericSpell.NeedsGrimoire)
            {
                return true;
            }
            Equipment component = stats.GetComponent<Equipment>();
            if (component == null || component.CurrentItems == null || component.CurrentItems.Grimoire == null)
            {
                return false;
            }
            Grimoire component2 = component.CurrentItems.Grimoire.GetComponent<Grimoire>();
            return !(component2 == null) && component2.HasSpell(genericSpell);
        }
开发者ID:tjayharvey,项目名称:IEMod.pw,代码行数:34,代码来源:mod_UIAbilityBarButtonSet.cs

示例10: SubtractStats

 public void SubtractStats(CharacterStats statsToSubtract)
 {
     swagger -= statsToSubtract.swagger;
     strength -= statsToSubtract.strength;
     agility -= statsToSubtract.agility;
     mind -= statsToSubtract.mind;
     health -= statsToSubtract.health;
 }
开发者ID:ullizei,项目名称:pirates,代码行数:8,代码来源:CharacterStats.cs

示例11: AddStats

 public void AddStats(CharacterStats statsToAdd)
 {
     swagger += statsToAdd.swagger;
     strength += statsToAdd.strength;
     agility += statsToAdd.agility;
     mind += statsToAdd.mind;
     health += statsToAdd.health;
 }
开发者ID:ullizei,项目名称:pirates,代码行数:8,代码来源:CharacterStats.cs

示例12: Start

    void Start()
    {
        anim = GetComponent<Animator>();
        playerController = GetComponent<PlayerMovementController>();
        characterStats = GetComponent<CharacterStats>();
        colliderr = GetComponent<CapsuleCollider>();

        characterControlInterface = GetComponent<CharacterControlInterface>();
    }
开发者ID:Hoon-Park,项目名称:MMOArenaUnity,代码行数:9,代码来源:AnimationController.cs

示例13: Awake

    void Awake()
    {
        stats = GetComponentInParent<CharacterStats>();

        if (stats == null)
        {
            Debug.LogError("Can not found CharacterStats! " + this.gameObject.name);
        }
    }
开发者ID:t1mmmmY,项目名称:SeaDogs,代码行数:9,代码来源:BodyPart.cs

示例14: Awake

    Vector3 greenPos; //Position of the health bar relative to the character

    #endregion Fields

    #region Methods

    void Awake()
    {
        //loads enemy health value from healthScript
        healthScript = transform.parent.gameObject.GetComponent<CharacterStats>();
        curHealth = healthScript.health;
        maxHealth = healthScript.maxHealth;

        //stores two health values, will come in later
    }
开发者ID:Torppo,项目名称:IntramuralRPG,代码行数:15,代码来源:EnemyHealth.cs

示例15: Start

    void Start()
    {
        characterStats = GetComponent<CharacterStats>();

        characterStats.HPScaler *= hpScale;
        characterStats.MovingSpeedModifier += movingSpeedModifier;

        transform.localScale *= sizeScale;
    }
开发者ID:tobygameac,项目名称:2015AR,代码行数:9,代码来源:Strongger.cs


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