コード例 #1
0
ファイル: HUDHitIndicator.cs プロジェクト: Virobeast2/RCLIENT
    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;
    }
コード例 #2
0
ファイル: HUDIndicator.cs プロジェクト: sknchan/LegacyRust
 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));
 }
コード例 #3
0
    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();
    }
コード例 #4
0
ファイル: HUDIndicator.cs プロジェクト: sknchan/LegacyRust
 protected static HUDIndicator InstantiateIndicator(HUDIndicator.ScratchTarget target, HUDIndicator prefab)
 {
     return(HUDIndicator.InstantiateIndicator(target, prefab, HUDIndicator.PlacementSpace.Anchor, Vector3.zero, 0f));
 }
コード例 #5
0
ファイル: HUDIndicator.cs プロジェクト: sknchan/LegacyRust
 protected static HUDIndicator InstantiateIndicator(HUDIndicator.ScratchTarget target, HUDIndicator prefab, HUDIndicator.PlacementSpace space, Vector3 position)
 {
     return(HUDIndicator.InstantiateIndicator(target, prefab, space, position, 0f));
 }