Esempio n. 1
0
    /// <summary>
    ///     Starts the game.
    /// </summary>
    /// <param name="data">Information data.</param>
    public void StartGame(StartData data)
    {
        // reset data
        _hits = 1;

        _power       = 0.4f;
        _powerBarDir = 1;
        _curLevel    = data.Level;

        // instantiate target + club
        _targetSpot = (GameObject)Instantiate(TargetSpot);
        _targetSpot.transform.parent = transform.parent;

        _golfClub = (GameObject)Instantiate(GolfClub);
        _golfClub.transform.parent = transform.parent;

        _clubScript = _golfClub.GetComponent <ClubScript>();
        _clubScript.SetScript(this);

        _tutScript = data.TutScript;

        // let's go
        _vectorLine.ForceClear();
        _gameState = States.FirstRun;
    }
Esempio n. 2
0
    // Use this for initialization
    void Start()
    {
        Physics2D.gravity   = Vector2.zero;
        multiplierText.text = "Multiplier: ";

        line = lineObject.GetComponent <LineGenerator>();
        notificationScript = GameObject.Find("NotificationText").GetComponent <TutScript> ();
        notificationScript.displayText("Place your finger on the circle!", 60);
    }
    // Use this for initialization
    void Start()
    {
        characterMouseLook = GetComponent<MouseLook> ();
        mcamera = GameObject.Find("Main Camera").GetComponent<MouseLook> ();
        fpscontroller = GetComponent<FPSInputController> ();
        motion = GameObject.Find ("Arms").GetComponent<MotionScript> ();
        inventory = GameObject.Find ("Inventory").GetComponent<InventarScript> ();
        inventory.pausedTheGame (false);

        tutorial = GameObject.Find ("Tut").GetComponent<TutScript> ();
    }