示例#1
0
    private void DestoryBone()
    {
        var targets = new string[] { "LeftPoint", "RightPoint", "HeadPoint" };
        var target  = targets[UnityEngine.Random.Range(0, 3)];

        player.TakeDamage(target, 1, null);
    }
示例#2
0
    /// <summary>
    /// Attacking: Player to AI
    /// </summary>
    public void Attacking()
    {
        // Take current state. \\
        cHZ = indicatorLogic.GetCurrentHitzone();
        switch (cHZ.color)
        {
        // Miss;
        case HitZoneColor.RED:
            eBChS.TakeDamage(cHZ.hitzoneType, 0);
            indicatorLogic.ChangeIndicatorImage("Miss");
            break;

        case HitZoneColor.YELLOW:
            eBChS.TakeDamage(cHZ.hitzoneType, Random.Range(0.45f, 0.75f));
            break;

        // If you'er successful.
        case HitZoneColor.GREEN:
            eBChS.TakeDamage(cHZ.hitzoneType, 1f);
            break;
        }
    }