SetDifficulty() public static method

public static SetDifficulty ( int mode ) : void
mode int
return void
コード例 #1
0
ファイル: normalButton.cs プロジェクト: eloipuertas/ES2014B
    void Awake()
    {
        Time.timeScale = 1;
        Rect initPixelInset = new Rect(0, 0, 1, 1);

        initPixelInset.height = Screen.height * 0.10f;
        initPixelInset.width  = initPixelInset.height * 3f;
        initPixelInset.x      = Screen.width * 0.05f;
        initPixelInset.y      = -Screen.height * 0.475f;
        guiTexture.pixelInset = initPixelInset;
        color            = guiTexture.color;
        color.a          = 0;
        guiTexture.color = color;
        Gameflow.SetDifficulty(Gameflow.MEDIUM);
        // animation
        timeLeftAnimationChange = timeBetweenAnimationUnS;
        this.active             = true;
        animationIndex          = 0;
        timeLeftAnimationChange = timeBetweenAnimationS;
        currentAnimation        = texturesS;
        easyButton.noActive();
        hardButton.noActive();
        animationForward = true;
        animationIndex   = 0;
    }
コード例 #2
0
 public void OnMouseEnter()
 {
     if (!Gameflow.IsDifficulty(Gameflow.EASY) && !Gameflow.IsDifficulty(Gameflow.MEDIUM) && !Gameflow.IsDifficulty(Gameflow.HARD))
     {
         Gameflow.SetDifficulty(Gameflow.MEDIUM);
     }
     selected                = true;
     animationIndex          = 0;
     timeLeftAnimationChange = timeBetweenAnimationS;
     currentAnimation        = texturesS;
 }
コード例 #3
0
ファイル: hardButton.cs プロジェクト: eloipuertas/ES2014B
    public void OnMouseUpAsButton()
    {
        audio.PlayOneShot(level_hard);
        this.active             = true;
        animationIndex          = 0;
        timeLeftAnimationChange = timeBetweenAnimationS;
        currentAnimation        = texturesS;

        easyButton.noActive();
        normalButton.noActive();
        // easy button NO active
        // normal button NO active

        Gameflow.SetDifficulty(Gameflow.HARD);
    }