void changeSpriteFunc(ARROW_DIRECTIONS_TUTORIAL changer)
    {
        switch (changer)
        {
        case ARROW_DIRECTIONS_TUTORIAL.TUTORIAL_UP:
            playerSpRen.sprite = playerUp;
            mirrorSpRen.sprite = mirrorUp;
            idleTimer          = maxTimeTilIdle;
            break;

        case ARROW_DIRECTIONS_TUTORIAL.TUTORIAL_DOWN:
            playerSpRen.sprite = playerDown;
            mirrorSpRen.sprite = mirrorDown;
            idleTimer          = maxTimeTilIdle;
            break;

        case ARROW_DIRECTIONS_TUTORIAL.TUTORIAL_LEFT:
            playerSpRen.sprite = playerLeft;
            mirrorSpRen.sprite = mirrorLeft;
            idleTimer          = maxTimeTilIdle;
            break;

        case ARROW_DIRECTIONS_TUTORIAL.TUTORIAL_RIGHT:
            playerSpRen.sprite = playerRight;
            mirrorSpRen.sprite = mirrorRight;
            idleTimer          = maxTimeTilIdle;
            break;

        default:
            Debug.Log("durn");
            break;
        }
    }
    // Use this for initialization
    void Start()
    {
        ArrowMainScr = ArrowMainObj.GetComponent <MG_MirrorArrowMainScript> ();
        ownSprite    = gameObject.GetComponent <SpriteRenderer> ();

        ownSprite.enabled = false;

        arrowPoint = ARROW_DIRECTIONS_TUTORIAL.TUTORIAL_NULL;
    }
 // Update is called once per frame
 void Update()
 {
     if (arrowPoint != ARROW_DIRECTIONS_TUTORIAL.TUTORIAL_NULL)
     {
         ownSprite.enabled = true;
         arrowPoint        = ArrowMainScr.giveCommandFunction();
         setupDirection();
     }
     else
     {
         ownSprite.enabled = false;
         arrowPoint        = ArrowMainScr.giveCommandFunction();
     }
 }
Beispiel #4
0
    // Update is called once per frame
    void Update()
    {
        if (commandReady == false)
        {
            commandCurrent = ARROW_DIRECTIONS_TUTORIAL.TUTORIAL_NULL;
        }

        if (timerHidden >= 0)
        {
            timerHidden -= Time.deltaTime;
        }
        else
        {
            commandCurrent = patternList [listMarker];
            commandReady   = true;
        }
    }
    public bool directionInput(ARROW_DIRECTIONS_TUTORIAL playerInput)
    {
        if (playerInput == arrowPoint)
        {
            ArrowMainScr.commandFollowed();

            arrowPoint = ARROW_DIRECTIONS_TUTORIAL.TUTORIAL_NULL;

            ownSprite.enabled = false;

            arrowPoint = ArrowMainScr.giveCommandFunction();



            return(true);
        }
        else
        {
            return(false);
        }
    }
Beispiel #6
0
 // Use this for initialization
 void Start()
 {
     timerHidden    = nextCommandTimer;
     commandCurrent = ARROW_DIRECTIONS_TUTORIAL.TUTORIAL_NULL;
 }