Exemplo n.º 1
0
    void Awake()
    {
        HUD = new HeadUpDisplay();
        HUD.Init();
        countDownSprites = Resources.LoadAll<Sprite>("2D/HUD/CountDown");

        trailMat = Resources.LoadAll<Material>("Materials/Characters/Trails");

        switchedZones = false;
        matchIsOver = false;
        matchHasStarted = false;
        loadingWinScene = false;
        scoringDirection = 1;

        playerPositions.Add (new Vector3 (-20.0f, 1.0f, 12.0f));
        playerPositions.Add (new Vector3 (20.0f, 1.0f, 12.0f));
        playerPositions.Add (new Vector3 (-20.0f, 1.0f, -12.0f));
        playerPositions.Add (new Vector3 (20.0f, 1.0f, -12.0f));

        playerRotations.Add (new Vector3 (0f, 125.0f, 0f));
        playerRotations.Add (new Vector3 (0f, 235.0f, 0f));
        playerRotations.Add (new Vector3 (0f, 45.0f, 0f));
        playerRotations.Add (new Vector3 (0f, 315.0f, 0f));

        GameObject ballGo = GameObject.FindGameObjectWithTag("Ball");
        _ballController = ballGo.GetComponent<BallController> ();

        if(!debugging){
            _characterSelectController = GameObject.Find("Character Select Controller").GetComponent<CharacterSelectController>();
            players = new GameObject[4];
            InstantiatePlayers ();
        }
    }
Exemplo n.º 2
0
    ///////////////////////////////////////////////////////////////////////////
    //  非公開関数
    ///////////////////////////////////////////////////////////////////////////
    //初期化===================================================================
    void Awake()
    {
        //PlayerManager取得----------------------------------------------------
        m_PlyMgr = GameObject.FindObjectOfType <PlayerManager>();
        //子オブジェクトの参照
        m_HUD = transform.FindChild("Canvas").GetComponent <HeadUpDisplay>();
        //アンカー
        m_CouresAncs = GameObject.Find(CourseAnchors.GBJ_NAME).GetComponent <CourseAnchors>();

        //カメラ関連初期化
        CameraAwke();
    }
    ///////////////////////////////////////////////////////////////////////////
    //  非公開関数
    ///////////////////////////////////////////////////////////////////////////
    //初期化===================================================================
    void Awake()
    {
        //PlayerManager取得----------------------------------------------------
        m_PlyMgr = GameObject.FindObjectOfType<PlayerManager>();
        //子オブジェクトの参照
        m_HUD   = transform.FindChild("Canvas").GetComponent<HeadUpDisplay>();
        //アンカー
        m_CouresAncs     = GameObject.Find(CourseAnchors.GBJ_NAME).GetComponent<CourseAnchors>();

        //カメラ関連初期化
        CameraAwke();
    }
Exemplo n.º 4
0
 private void Awake()
 {
     hud      = FindObjectOfType <HeadUpDisplay>();
     coolDown = -1f;
 }