コード例 #1
0
ファイル: QFrame.cs プロジェクト: gedemagt/GameJam
    /// <summary>
    /// Set the level currently maintained in the QFrame. 
    /// </summary>
    /// <param name="str">The level</param>
    public void setLevel(Level level)
    {
        levelString = level.id;
        this.level = level;
        worldAxis = new Axis(level.xMinVal, level.xMaxVal, level.ampMinVal, level.ampMaxVal,
        transform.position.x,
        transform.position.x + transform.localScale.x,
        transform.position.y,
        transform.position.y + transform.localScale.y);

        localAxis = new Axis(level.xMinVal, level.xMaxVal, level.ampMinVal, level.ampMaxVal, 0.0, 1.0, 0.0, 1.0);

        currentWave = level.getInitialWaveFunction();
        nextPoint = level.getStartPoint();
        lastPoint = nextPoint;

        transform.GetComponent<Drawer>().refresh();
        transform.FindChild("Target").GetComponent<Target>().refresh();
    }