public override void PreAttackAction() { GameObject ring = GameObject.Instantiate(Links.links.magicRing); summonPosition = attacker.transform.TransformPoint(position); ring.transform.position = summonPosition; OverlayDisplay.Show(Links.links.starImage, 0, 0.5f); }
public override void PreAttackAction() { relativeTargetPosition = Vector3.forward * initialDistance; aiming = true; startTime = Time.time; marker = GameObject.Instantiate(Links.links.aimMarker).GetComponent <AimMarker>(); marker.transform.position = attacker.transform.TransformPoint(relativeTargetPosition); OverlayDisplay.Show(Links.links.spikeImage, 0, 0.5f); }
public override void AttackAction() { SpeedBuff buff = new GameObject().AddComponent <SpeedBuff>(); buff.unit = target; buff.duration = duration; buff.speedBoost = speedBoost; OverlayDisplay.Show(Links.links.infinityImage, 0, 0.5f); }
public override void AttackAction() { RegenerateHealthBuff buff = new GameObject().AddComponent <RegenerateHealthBuff>(); buff.unit = target; buff.duration = duration; buff.regenerateAmountPerTick = regenerateAmountPerTick; buff.tickPerSecond = tickPerSecond; OverlayDisplay.Show(Links.links.healImage, 0, 0.5f); }
public override void PreAttackAction() { angle = 0; aiming = true; startTime = Time.time; aimLine = GameObject.Instantiate(Links.links.aimLine); aimLine.transform.position = attacker.transform.position + 0.5f * Vector3.up; aimLine.transform.rotation = attacker.transform.rotation; aimLine.transform.localScale = new Vector3(1, 1, range); OverlayDisplay.Show(Links.links.crossImage, 0, 0.5f); }
private void finish() { clearAll(); if (OnTrigger != null) { OnTrigger(type); } if (image != null) { OverlayDisplay.Show(image, 0, 0.5f); } }
public override void AttackAction() { List <Unit> enemiesInRange = Unit.EnemiesInRange(attacker.transform.position, maxRadius, attacker.team); foreach (Unit enemie in enemiesInRange) { Vector3 vec = enemie.transform.position - attacker.transform.position; Vector3 radialVec = Vector3.ProjectOnPlane(vec, Vector3.up).normalized; float power = 1 - vec.magnitude / maxRadius; if (power > 0) { Vector3 impulse = maxUpImpulse * power * Vector3.up + maxRadialImpulse * power * radialVec; enemie.SendFlying(impulse); } } OverlayDisplay.Show(Links.links.flashImage, 0, 0.5f); GameObject shockRing = GameObject.Instantiate(Links.links.shockRing); shockRing.transform.position = attacker.transform.position; }
private bool SetCalibrationPoint(int i) { if (rightHand == null) { Debug.Log("Right hand not found!"); } else { Finger index = GetIndexFinger(rightHand); if (index == null) { Debug.Log("Index finger not found!"); } else { cornerPositions[i] = index.Bone(Bone.BoneType.TYPE_DISTAL).NextJoint.ToVector3(); Debug.Log("Position get! " + cornerPositions[i].x + " " + cornerPositions[i].y + " " + cornerPositions[i].z); return(true); } } OverlayDisplay.Show(Links.links.calibrationWarning, 2, 1); return(false); }
public override void PreAttackAction() { OverlayDisplay.Show(Links.links.ligntningImage, 0, 0.5f); }