Exemplo n.º 1
0
    private void Start()
    {
        // Indicator script init; \\
        indicatorLogic = GetComponentInChildren <IndicatorLogic>(true);
        // Nearest target (Point), nearests point color \\
        /// ummary>
        ///
        /// </summary>
        /// <returns></returns>

        cHZ   = indicatorLogic.GetCurrentHitzone();
        eBChS = GetComponent <BonyCharacter>();
    }
Exemplo n.º 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;
        }
    }