Exemple #1
0
    public RuntimeAnimatorController SetRuntimeAnimator(TypeHamster typeHamster)
    {
        switch (typeHamster)
        {
        case TypeHamster.StandSmall:
            return(animationControllStandSmall);

        case TypeHamster.StandBig:
            return(animationControllStandBig);

        case TypeHamster.BombSmall:
            return(animationControllBombSmall);

        case TypeHamster.BombBig:
            return(animationControllBombBig);

        case TypeHamster.HealSmall:
            return(animationControllHealSmall);

        case TypeHamster.HealBig:
            return(animationControllHealBig);
        }

        return(null);
    }
Exemple #2
0
    private void SetType(TypeHamster typeHamster, GameObject goHamster)
    {
        switch (typeHamster)
        {
        case TypeHamster.StandSmall:
            goHamster.AddComponent <HamsterStandSmall>();
            break;

        case TypeHamster.StandBig:
            goHamster.AddComponent <HamsterStandBig>();
            break;

        case TypeHamster.BombSmall:
            goHamster.AddComponent <HamsterBombSmall>();
            break;

        case TypeHamster.BombBig:
            goHamster.AddComponent <HamsterBombBig>();
            break;

        case TypeHamster.HealSmall:
            goHamster.AddComponent <HamsterHealSmall>();
            break;

        case TypeHamster.HealBig:
            goHamster.AddComponent <HamsterHealBig>();
            break;
        }
    }