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


C# PlayerCharacter.GetPrimaryAttribute方法代码示例

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


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

示例1: Start

	// Use this for initialization
	void Start ()
    {
        _toon = new PlayerCharacter();
        _toon.Awake();

        pointsLeft = STARTING_POINTS;

        for (int i = 0; i < Enum.GetValues(typeof(AttributeName)).Length; i++)
        {
            _toon.GetPrimaryAttribute(i).BaseValue = STARTING_VALUE;
            pointsLeft -= (STARTING_VALUE - MIN_STARTING_ATTRIBUTE_VALUE);
        }

        _toon.StatUpdate();
        
	}
开发者ID:ahmetacer5,项目名称:project-unity,代码行数:17,代码来源:CharacterGenerator.cs

示例2: Start

	// Use this for initialization
	void Start () {
		GameObject pc = Instantiate(playerPrefab, Vector3.zero, Quaternion.identity)as GameObject;
		
		pc.name = "pc";
		
		//_toon = new PlayerCharacter(); 
		//_toon.Awake();
		_toon = pc.GetComponent<PlayerCharacter>();
		
		pointsLeft = STARTING_POINTS;
		
		for(int cnt = 0; cnt< Enum.GetValues(typeof(AttributeName)).Length; cnt++){
			_toon.GetPrimaryAttribute(cnt).BaseValue = STARTING_VALUE;
			pointsLeft -= (STARTING_VALUE - MIN_STARTING_ATTRIBUTE_VALUE);
		}
		_toon.StatUpdate();
	}
开发者ID:NeoWang1986614,项目名称:games-development-project,代码行数:18,代码来源:CharacterGenerator.cs

示例3: Start

    // Use this for initialization
    void Start()
    {
        GameObject pc = Instantiate(playerPrefab, Vector3.zero, Quaternion.identity) as GameObject;
        pc.name = "pc";

        _toon = pc.GetComponent<PlayerCharacter>();

        //not needed do to the changes adding the game object and pc.name

        //_toon = new PlayerCharacter();
        //_toon.Awake();

        pointsLeft = STARTING_POINTS;

        for (int cnt = 0; cnt < Enum.GetValues(typeof(AttributeName)).Length; cnt++)
        {
            //minimum point is 10, but 50 will start in each
            _toon.GetPrimaryAttribute(cnt).BaseValue = STARTINGVALUE;
            pointsLeft-=(STARTINGVALUE - MIN_STARTING_ATTRIBUTE_VALUE);

        }
    }
开发者ID:Etherify,项目名称:HackAndSlash,代码行数:23,代码来源:CharacterGenerator.cs

示例4: Start

    // Use this for initialization
    void Start()
    {
        GameObject player = Instantiate (playerPrefab, Vector3.zero, Quaternion.identity) as GameObject;
        player.name = "Player";

        _char = player.GetComponent<PlayerCharacter> ();
        _char.Awake ();

        pointsLeft = STARTING_POINTS;

        for (int i = 0; i < Enum.GetValues(typeof(AttributeName)).Length; i++) {
            _char.GetPrimaryAttribute (i).BaseValue = STARTING_ATTRIBUTE_VALUE;
            pointsLeft -= (STARTING_ATTRIBUTE_VALUE - MIN_STARTING_ATTRIBUTE_VALUE);
        }

        _char.StatUpdate ();
    }
开发者ID:Nesh108,项目名称:MonoShoot,代码行数:18,代码来源:CharacterGenerator.cs

示例5: Start

    // Use this for initialization
    void Start()
    {
        var pc = Instantiate(playerPrefab,Vector3.zero,Quaternion.identity);

        pc.name="pc";

        _toon = (pc as GameObject).GetComponent<PlayerCharacter>();
        _toon.Awake();
        attributeValueCount=Enum.GetValues(typeof(AttributeName)).Length;
        vitalValueCount=Enum.GetValues(typeof(VitalName)).Length;
        for(var cnt= 0; cnt<attributeValueCount ;cnt++)
        {
            _toon.GetPrimaryAttribute(cnt).BaseValue=STARTING_VALUE;
            pointsLeft-=(STARTING_VALUE - MIN_STARTING_ATTRIBUTE_VALUE);
        }

        _toon.StatUpdate();
    }
开发者ID:root525,项目名称:HackAndSlash,代码行数:19,代码来源:CharacterGenerator.cs

示例6: Start

    void Start()
    {
        //CREATES A PLAYER PREFAB AT 0,0,0
        GameObject pc = Instantiate(playerPrefab,Vector3.zero, Quaternion.identity) as GameObject;

        pc.name = "pc";

        _toon = pc.GetComponent<PlayerCharacter>();

        pointsLeft = STARTING_POINTS;
        //SETTING THE VALUES OF THE ATTRIBUTES TO THE MIN
        for(int cnt = 0; cnt < Enum.GetValues(typeof(AttributeName)).Length; cnt++) {
            _toon.GetPrimaryAttribute(cnt).BaseValue = MIN_STARTING_ATTRIBUTE_POINTS;
        }
        //SETS UP THE VALUES BEFORE A BUTTON PRESS
        _toon.StatUpdate();
    }
开发者ID:smorris383,项目名称:Racially-Correct-Entertainment,代码行数:17,代码来源:CharacterGenerator.cs

示例7: Start

    // Use this for initialization
    void Start()
    {
        toon = new PlayerCharacter();
        toon.Awake();

        pointsLeft = StartingPoints;

        for (int i = 0; i < Enum.GetValues(typeof(AttributeName)).Length; i++)
        {
            toon.GetPrimaryAttribute(i).BaseValue = StartingValue;
            pointsLeft -= (StartingValue - MinimumStartingValue);
        }

        toon.StatUpdate();
    }
开发者ID:MrPhil,项目名称:HackAndSlash,代码行数:16,代码来源:CharacterGenerator.cs

示例8: Start

    // Use this for initialization
    void Start()
    {
        _toon = new PlayerCharacter();
        _toon.Awake();

        pointsLeft = START_PTS;

        for(int x = 0; x < (Enum.GetNames(typeof(AttributeName))).Length; x++) {
            _toon.GetPrimaryAttribute(x).BaseValue = STARTING_VALUE;
            pointsLeft -= (STARTING_VALUE - MIN_STARTING_ATTR);
        }

        _toon.StatUpdate();
    }
开发者ID:nukeforum,项目名称:MobileMonsters,代码行数:15,代码来源:CharacterGenerator.cs

示例9: Start

    // Use this for initialization
    void Start()
    {
        GameObject pc = Instantiate(playerPrefab, Vector3.zero, Quaternion.identity) as GameObject;

        pc.name = "pc";

        _toon = pc.GetComponent<PlayerCharacter>();

        pointsLeft = StartingPoints;
        for (int cnt = 0; cnt < Enum.GetValues(typeof(AttributeName)).Length; cnt++)
        {
            _toon.GetPrimaryAttribute(cnt).BaseValue = StartValue;
            pointsLeft -= (StartValue - MinStartingAttributeValue);
        }
        _toon.StatUpdate();
    }
开发者ID:zachstratton,项目名称:Player,代码行数:17,代码来源:CharacterGenerator.cs

示例10: Start

    // Use this for initialization
    void Start()
    {
        /*
         * Edits made to the script from the live show #4
         */
        GameObject pc = Instantiate(playerPrefab, Vector3.zero, Quaternion.identity) as GameObject;
        //GameObject pc = playerPrefab;

        /*
         * End Live Show #4 edits
         */

        if(pc == null)
            Debug.LogError("we need a player character added to tghe inspector!!");

        pc.name = "pc";

        _toon = pc.GetComponent<PlayerCharacter>();

        if(_toon == null) {
            Debug.LogWarning("Our character is missing the PlayerCharacter.cs script. Adding it!");
        }

        pointsLeft = STARTING_POINTS;

        for(int cnt = 0; cnt < Enum.GetValues(typeof(AttributeName)).Length; cnt++) {
            _toon.GetPrimaryAttribute(cnt).BaseValue = STARTING_VALUE;
            pointsLeft -= (STARTING_VALUE - MIN_STARTING_ATTRIBUTE_VALUE);
        }

        _toon.StatUpdate();
    }
开发者ID:senkay,项目名称:unitygame,代码行数:33,代码来源:CharacterGenerator.cs


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