本文整理汇总了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();
}
示例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();
}
示例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);
}
}
示例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 ();
}
示例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();
}
示例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();
}
示例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();
}
示例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();
}
示例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();
}
示例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();
}