Ejemplo n.º 1
0
    private void Awake()
    {
        inSightType          = InSightType.None;
        isFadeCrosshair      = false;
        current              = this;
        HitCrosshair.enabled = false;

        _crosshairFadeCooldown = new Cooldown {
            OnUpdate = CrosshairFadeUpdate, OnFinish = CrosshairFadeFinish
        };
        _ammunitionFadeCooldown = new Cooldown {
            OnUpdate = AmmunitionFadeUpdate
        };
        _killCountFadeCooldown = new Cooldown {
            OnUpdate = KillCountFadeUpdate
        };

        insightCrosshairColours = new Dictionary <InSightType, Color>
        {
            { InSightType.None, Color.white },
            { InSightType.Friendly, FriendlyCrosshair },
            { InSightType.Enemy, EnemyCrosshair }
        };

        AmmunitionContainer.alpha = 0f;
        KillCountContainer.alpha  = 0f;

        var hudFont = Resources.Load <Font>("Fonts/EU____");

        ammoStyle = new GUIStyle
        {
            alignment = TextAnchor.MiddleRight,
            normal    = { textColor = Color.white },
            font      = hudFont,
            fontSize  = 30
        };
    }
Ejemplo n.º 2
0
 public void SetTargetInSight(InSightType value)
 {
     inSightType = value;
 }
Ejemplo n.º 3
0
 public void SetTargetInSight(InSightType value)
 {
     inSightType = value;
 }
Ejemplo n.º 4
0
    private void Awake()
    {
        inSightType = InSightType.None;
        isFadeCrosshair = false;
        current = this;
        HitCrosshair.enabled = false;

        var hudFont = Resources.Load<Font>("Fonts/EU____");
        ammoStyle = new GUIStyle
        {
            alignment = TextAnchor.MiddleRight,
            normal = { textColor = Color.white },
            font = hudFont,
            fontSize = 30
        };
    }