Example #1
0
    /// <summary>
    /// On verifie si la zone d'attaque est possible, si oui on modifie le booléen canPlantArm correspondant dans le MiniGameController
    /// </summary>
    /// <param name="col"></param>
    private void AttackZoneCheckIn(Collider col)
    {
        switch (col.gameObject.name)
        {
            case "UpperUpLeftAttackZone":
                GetComponentInParent<MiniGameController>().canPlantRightArm = true;
                _currentPosition = ClawStatus.UpperUpLeft;
                break;

            case "LowerUpLeftAttackZone":
                GetComponentInParent<MiniGameController>().canPlantRightArm = true;
                _currentPosition = ClawStatus.LowerUpLeft;
                break;

            case "UpperBottomLeftAttackZone":
                GetComponentInParent<MiniGameController>().canPlantRightArm = true;
                _currentPosition = ClawStatus.UpperBottomLeft;
                break;

            case "LowerBottomLeftAttackZone":
                GetComponentInParent<MiniGameController>().canPlantRightArm = true;
                _currentPosition = ClawStatus.LowerBottomLeft;
                break;

            case "UpperUpRightAttackZone":
                GetComponentInParent<MiniGameController>().canPlantLeftArm = true;
                _currentPosition = ClawStatus.UpperUpRight;
                break;


                //LE COEUR !!!
            case "LowerUpRightAttackZone":
                GetComponentInParent<MiniGameController>().canPlantLeftArm = true;
                _currentPosition = ClawStatus.LowerUpRight;
                //On met du feed back dans le controller du joueur pour indiqué qu'il est sur le coeur
                

                break;

            case "UpperBottomRightAttackZone":
                GetComponentInParent<MiniGameController>().canPlantLeftArm = true;
                _currentPosition = ClawStatus.UpperBottomRight;
                break;

            case "LowerBottomRightAttackZone":
                GetComponentInParent<MiniGameController>().canPlantLeftArm = true;
                _currentPosition = ClawStatus.LowerBottomRight;
                break;
        }
    }
Example #2
0
    /// <summary>
    /// On enleve la possibilité de planter un bras lorsque le bras sort d'une des zones d'attaques
    /// </summary>
    /// <param name="col"></param>
    private void AttackZoneCheckOut(Collider col)
    {
        switch (col.gameObject.name)
        {
            case "UpperUpLeftAttackZone" :
                GetComponentInParent<MiniGameController>().canPlantRightArm = false;
                _currentPosition = ClawStatus.None;
                break;

            case "LowerUpLeftAttackZone":
                GetComponentInParent<MiniGameController>().canPlantRightArm = false;
                _currentPosition = ClawStatus.None;
                break;

            case "UpperBottomLeftAttackZone":
                GetComponentInParent<MiniGameController>().canPlantRightArm = false;
                _currentPosition = ClawStatus.None;
                break;
                
            case "LowerBottomLeftAttackZone":
                GetComponentInParent<MiniGameController>().canPlantRightArm = false;
                _currentPosition = ClawStatus.None;
                break;
                
            case "UpperUpRightAttackZone":
                GetComponentInParent<MiniGameController>().canPlantLeftArm = false;
                _currentPosition = ClawStatus.None;
                break;

            case "LowerUpRightAttackZone":
                GetComponentInParent<MiniGameController>().canPlantLeftArm = false;
                _currentPosition = ClawStatus.None;
                break;

            case "UpperBottomRightAttackZone":
                GetComponentInParent<MiniGameController>().canPlantLeftArm = false;
                _currentPosition = ClawStatus.None;
                break;

            case "LowerBottomRightAttackZone":
                GetComponentInParent<MiniGameController>().canPlantLeftArm = false;
                _currentPosition = ClawStatus.None;
                break;
        }

    }