Пример #1
0
    public void Start()
    {
        animator = player.GetComponent <Animator>();
        jumpHard = thePlayer.GetComponent <JumpHard>();

        //Load Colour
        isYellow  = ES2.Load <bool>("savefile.txt?tag=isYellow");
        isBlue    = ES2.Load <bool>("savefile.txt?tag=isBlue");
        isRed     = ES2.Load <bool>("savefile.txt?tag=isRed");
        isGreen   = ES2.Load <bool>("savefile.txt?tag=isGreen");
        isMarble  = ES2.Load <bool>("savefile.txt?tag=isMarble");
        isElectro = ES2.Load <bool>("savefile.txt?tag=isElectro");

        if (isYellow)
        {
            animator.runtimeAnimatorController = yellow;
        }
        if (isBlue)
        {
            animator.runtimeAnimatorController = blue;
        }
        if (isRed)
        {
            animator.runtimeAnimatorController = red;
        }
        if (isGreen)
        {
            animator.runtimeAnimatorController = green;
        }
        if (isMarble)
        {
            animator.runtimeAnimatorController = marble;
        }
        if (isElectro)
        {
            animator.runtimeAnimatorController = electro;
        }
    }
Пример #2
0
 void Start()
 {
     //Getting the player jump ability
     jumpHard = thePlayer.GetComponent <JumpHard>();
 }