Exemple #1
0
    // Use this for initialization
    void Start()
    {
        character        = GetComponent <Character>();
        animator         = GetComponent <Animator>();
        AIcontrols       = GetComponentInParent <AIControls>();
        sharedProperties = GetComponentInParent <SharedProperties>();

        if (GetComponentInParent <Opponent>() != null)
        {
            player             = FindObjectOfType <Player>();
            playerCharacter    = player.GetComponentInChildren <Character>();
            opponentController = GetComponentInParent <Opponent>();
            animator.SetInteger("hadoukenOwner", 2);
        }
        else if (GetComponentInParent <Player>() != null)
        {
            opponent          = FindObjectOfType <Opponent>();
            opponentCharacter = opponent.GetComponentInChildren <Character>();
            playerController  = GetComponentInParent <Player>();
            animator.SetInteger("hadoukenOwner", 1);
        }

        decisionTimerInput = decisionTimer;
        antiAirTimerInput  = antiAirTimer;
        antiAirTimer       = 0f;
        decision           = Random.Range(0, 100);
        lastUsedNormal     = LastUsedNormal.none;
    }
Exemple #2
0
    void SetLastUsedNormal(int lastAttack)
    {
        switch (lastAttack)
        {
        case 0:
            lastUsedNormal = LastUsedNormal.lJab;
            break;

        case 1:
            lastUsedNormal = LastUsedNormal.lStrong;
            break;

        case 2:
            lastUsedNormal = LastUsedNormal.lFierce;
            break;

        case 3:
            lastUsedNormal = LastUsedNormal.lShort;
            break;

        case 4:
            lastUsedNormal = LastUsedNormal.lForward;
            break;

        case 5:
            lastUsedNormal = LastUsedNormal.lRoundhouse;
            break;

        default:
            lastUsedNormal = LastUsedNormal.none;
            break;
        }
    }