本文整理汇总了C#中Indicator.set方法的典型用法代码示例。如果您正苦于以下问题:C# Indicator.set方法的具体用法?C# Indicator.set怎么用?C# Indicator.set使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Indicator
的用法示例。
在下文中一共展示了Indicator.set方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Update
public void Update()
{
isInvincible = false;
if (player != null)
{
//find position after animation? will it use the position from before the animation starts? be ready to change
findPos();
if (!supercharged && currentHp() <= health.startingHealth / 2)
{
supercharged = true;
cd_Reduction = 3;
overload_Range *= 1.5;
bolt_Stun += 0.5f;
hook_Speed *= 1.5f;
knockback += 1.5f;
speedBoost++;
storm_CD = 0.6f;
}
rnd = new System.Random();
//if stunned = true, wait 0.5s, then gain a speedBoost for 3s
//else
distance = player.transform.position - transform.position;
if (distance.magnitude <= AgroRange)
{
isAgro = true;
}
if (distance.magnitude > AgroRange)
{
isAgro = false;
}
if (isAgro)
{
//targetPos *= 0.8f;
if (cooldown_CD > 1)
{
cooldown_CD = 0;
//faster the closer you are from him, probably better ways to do this but I don't want to look it up
float xSp = 2 * (AgroRange - (player.transform.position.x - transform.position.x));
float ySp = 2 * (AgroRange - (player.transform.position.y - transform.position.y));
//targetPos = new Vector2(0, 0);
moveController.Move(0, 0);
//basic aggression range formula
if (distance.magnitude < overload_Range && overload_CD > 12 - cd_Reduction)
{
overloadAttack();
}
else if (distance.magnitude < 0.3 && norm_CD > 1.5)
{
normAttack();
}
else if (lightning_CD > 10)
{
//animation
//lightning storm, player parameter or getObject(player)
//take in either bool supercharged or cooldown
//field = new LightningField();
field = Instantiate(fieldObj, player.transform.position, transform.rotation) as LightningField;
field.set(0.7f, storm_CD);
lightning_CD = 0;
//dark shadow below player?
}
else if (bolt_CD > 10 - cd_Reduction)
{
boltAttack();
}
//overload -> normal attack if in range -> lightning storm (effect) -> lightning bolt projectile(to set up other moves)
//-> thunder (put bolt here instead? depends on thunder activation speed)-> shot -> field -> speed -> charge
else if (supercharged && thunder_CD > 20)
{
//animation
//thunder, parameter player or getobject
//in thunder class, create black white black screen around player
//indic = new Indicator();
//indic.set or indicObj.set?
indic = Instantiate(indicObj, player.transform.position, transform.rotation) as Indicator;
indic.set(2);
thunder_CD = 0;
}
else if (shot_CD > 10 - cd_Reduction)
{
shotAttack();
}
else
{
//if wall within 0.2 units of one corner, move to another corner clockwise
//else
//if wall(not pole) to the left or right, disregard x velocity and increase y velocity
//if wall(not pole) above or below, disregard y velocity and increase x velocity
//else move away from player
cooldown_CD = 0.8f;
}
if (spark_CD > 2 + currentHp() / 5.0)
//.........这里部分代码省略.........