private Stage CreateStage(XElement xml)
        {
            Stage stage = new Stage(xml);

            switch (stage.Type)
            {
            case "Data":
                stage = new DataItem(xml);
                break;

            case "Action":
                stage = new ActionStage(xml);
                break;

            case "Code":
                stage = new CodeStage(xml);
                break;

            case "Exception":
                stage = new ExceptionStage(xml);
                break;

            case "WaitStart":
                stage = new WaitStartStage(xml);
                break;

            case "WaitEnd":
                stage = new WaitEndStage(xml);
                break;

            case "Start":
                stage = new StartStage(xml);
                break;

            case "End":
                stage = new EndStage(xml);
                break;

            case "Process":
                stage = new SubProcessStage(xml);
                break;

            case "Navigate":
                stage = new NavigateStage(xml);
                break;

            case "Read":
                stage = new ReadStage(xml);
                break;

            case "Write":
                stage = new WriteStage(xml);
                break;

            case "SubSheet":
                stage = new SubPageStage(xml);
                break;
            }
            return(stage);
        }
Exemple #2
0
    void SetUpComponents()
    {
        //club components
        followMouseComponent   = club.GetComponent <FollowMouse>();
        rotateTowardsComponent = club.GetComponent <RotateTowardsBall>();
        swingMeterComponent    = club.GetComponentInChildren <SwingForceMeter>();
        hitBallComponent       = club.GetComponentInChildren <HitBall>();

        //stage components
        navigateStageComponent = stage.GetComponent <NavigateStage>();

        //ball
        ballRB = ball.GetComponent <Rigidbody>();
    }