public static void CreateIndicator(Vector3 worldPoint, bool followPoint, HUDHitIndicator prefab) { HUDHitIndicator indicator = (HUDHitIndicator)HUDIndicator.InstantiateIndicator(HUDIndicator.ScratchTarget.CenteredAuto, prefab, HUDIndicator.PlacementSpace.World, worldPoint); indicator.worldPosition = worldPoint; indicator.followPoint = followPoint; }
protected static HUDIndicator InstantiateIndicator(HUDIndicator.ScratchTarget target, HUDIndicator prefab, HUDIndicator.PlacementSpace space, Vector3 position, float rotation) { HUDIndicator.ScratchTarget scratchTarget = target; if (scratchTarget == HUDIndicator.ScratchTarget.CenteredAuto) { return(HUDIndicator.InstantiateIndicator(ref HUDIndicator.CenterAuto, prefab, space, position, rotation)); } if (scratchTarget != HUDIndicator.ScratchTarget.CenteredFixed3000Tall) { throw new ArgumentOutOfRangeException("target"); } return(HUDIndicator.InstantiateIndicator(ref HUDIndicator.CenterFixed3000Tall, prefab, space, position, rotation)); }
public static void CreateIndicator(Vector3 worldDamageDirection, double damageAmount, double timestamp, double duration, HUDDirectionalDamage prefab) { HUDDirectionalDamage damage = (HUDDirectionalDamage)HUDIndicator.InstantiateIndicator(HUDIndicator.ScratchTarget.CenteredFixed3000Tall, prefab, HUDIndicator.PlacementSpace.DoNotModify, Vector3.zero); damage.damageTime = timestamp; damage.duration = duration; damage.damageAmount = damageAmount; damage.worldDirection = -worldDamageDirection; damage.transform.localPosition = Vector3.zero; damage.transform.localRotation = Quaternion.identity; damage.transform.localScale = Vector3.one; damage.texture.ForceReloadMaterial(); }
protected static HUDIndicator InstantiateIndicator(HUDIndicator.ScratchTarget target, HUDIndicator prefab) { return(HUDIndicator.InstantiateIndicator(target, prefab, HUDIndicator.PlacementSpace.Anchor, Vector3.zero, 0f)); }
protected static HUDIndicator InstantiateIndicator(HUDIndicator.ScratchTarget target, HUDIndicator prefab, HUDIndicator.PlacementSpace space, Vector3 position) { return(HUDIndicator.InstantiateIndicator(target, prefab, space, position, 0f)); }