本文整理汇总了C#中PlayerCharacter.Awake方法的典型用法代码示例。如果您正苦于以下问题:C# PlayerCharacter.Awake方法的具体用法?C# PlayerCharacter.Awake怎么用?C# PlayerCharacter.Awake使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PlayerCharacter
的用法示例。
在下文中一共展示了PlayerCharacter.Awake方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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 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 ();
}
示例3: 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();
}
示例4: 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();
}
示例5: Start
// Use this for initialization
void Start()
{
GameObject pc = Instantiate(playerPrefab, Vector3.zero, Quaternion.identity) as GameObject;
pc.name = "pc";
_toon = pc.GetComponent<PlayerCharacter>();
_toon.Awake();
_pointsLeft = STARTING_POINTS;
for(int cnt = 0; cnt < Enum.GetValues(typeof(AttributeName)).Length; cnt++ ){ // loop through the player attributes
_toon.getPrimaryAttribute(cnt).BaseValue = STARTING_VALUE;
_pointsLeft -=(STARTING_VALUE-MIN_STARTING_ATTRIBUTE_VALUE);
}
_toon.StatUpdate();
}
示例6: Start
// Use this for initialization
void Start()
{
_toon = new PlayerCharacter();
_toon.Awake();
}
示例7: 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();
}