本文整理汇总了C#中PlayerManager.getPlayers方法的典型用法代码示例。如果您正苦于以下问题:C# PlayerManager.getPlayers方法的具体用法?C# PlayerManager.getPlayers怎么用?C# PlayerManager.getPlayers使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PlayerManager
的用法示例。
在下文中一共展示了PlayerManager.getPlayers方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Update
// Update is called once per frame
void Update()
{
base.Update();
if (spawnM)
{
playerM = FindObjectOfType<PlayerManager>();
players = playerM.getPlayers();
size = players.Length;
threatLevel = damageDealt = players;
damageDealt = new Player[size];
for (int i = 0; i < size; i++)
{
players[i].Reset();
}
one = two = three = four = 0;
tempThreat = 0;
tempDamage = 0;
temp1 = 0;
temp2 = 0;
Grouper.setPlayerGroup(players, size);
grouping = false;
getPlayerType();
int initialTarget = UnityEngine.Random.Range(0, size);
target = players[initialTarget].gameObject;
spawnM = false;
}
targetPos = target.transform.position;
CalcDirection();
if (refresh)
{
Debug.Log(ranged + " " + grouping + " " + melee + " " + support);
refresh = false;
}
if (teleClawStage > 0)
{
teleClawUpdate();
}
if (isTeleporting)
{
//ANIMATION STUFF~~~~~~~~~~~~~~~~~
//How teleport works: transform to swarm -> isTel = true, swarm animations for moving around (same as
//normal swarm animations, low speed = circular, high speed = more horizontal, accel one way + low speed other way = turning
//remember to switch x scale on turn) -> isTel = false, transform to malady.
//if tele claw, then claw, tele process to new location (original unless people are clumping there)
//positions are already put in with a set time taken to get everywhere (lerp, teleduration, below) so animations have a set time
//ANIMATION STUFF~~~~~~~~~~~~~~~~~ isTeleporting set to true at end of transforming into swarm animation
//ANIMATION STUFF~~~~~~~~~~~~~~~~~ invincible set to true at start of transforming into swarm animation
transform.position = Vector3.Lerp(startPos, teleTarget, teleDuration);
if (lerpDuration <= 0)
{
isTeleporting = false;
isInvincible = false;
//ANIMATION STUFF~~~~~~~~~~~~~~~~~
//stop current animation, start transform back to human animation
//not needed below
//isTeleporting set to false at start of transforming into malady animation
//invincible set false at end of anim
}
}
else if (!animating)
{
Act(classification);
}
if (refreshPriority >= 10)
{
sortPriority();
refreshPriority = 0;
}
if (isInvincible && invTime <= 0)
{
isInvincible = false;
}
refreshPriority += Time.unscaledDeltaTime;
hands_CD += Time.unscaledDeltaTime;
animationDelay += Time.unscaledDeltaTime;
invTime -= Time.unscaledDeltaTime;
lerpDuration -= Time.unscaledDeltaTime;
}