Exemple #1
0
    // Move wand each frame
    private void MoveWand()
    {
        moveTime += Time.deltaTime;

        if (game.CanMoveWand())
        {
            MoveWandFromInput();
        }

        // If not moving, move to lock
        if (moveTime > moveToTileCooldown)
        {
            MoveWandToTile();
        }

        // Limit movement
        LimitWandPosition();
    }