コード例 #1
0
ファイル: GameManager.cs プロジェクト: rub0/Necroffice
    IEnumerator LoadLevelCoroutine(int level)
    {
        EnableInput(false);

        _alreadyLoadingLevel = true;

        //Baja cortina
        FadeCurtain.Toggle(); yield return(new WaitForSeconds(0.5f));

        //Player.gameObject.SetActive(true);
        GameManager.Instance.EnablePlayerNoDesactivate(true);

        if (CurrentlyLoadedLevel >= 0)
        {
            //Desactivar nivel previo
            Levels[CurrentlyLoadedLevel].gameObject.SetActive(false);
        }

        //Comprobar entrada
        if (Levels[level].Start == null)
        {
            Debug.LogError("No has asignado el punto de entrada del nivel " + level + ":" + Levels[level].name);
            yield break;
        }

        //Cargar el nivel pedido
        Levels[level].gameObject.SetActive(true);
        CurrentlyLoadedLevel = level;

        //Player al punto de salida
        Player.transform.position = Levels[level].Start.position;
        Player.transform.rotation = Levels[level].Start.rotation;

        //Cámara
        Camera.main.transform.position  = Player.transform.position;
        Camera.main.transform.position -= Camera.main.transform.forward * 25;

        //yield return new WaitForSeconds(0.5f);

        //Otras cosas al principio del nivel
        //...

        //Arriba cortina
        FadeCurtain.Toggle(); yield return(new WaitForSeconds(0.5f));

        EnableInput(true);

        //letrerico de nivel por el que vas
        EnterLevelLabel.text = "Entering Level " + (level + 1);
        EnterLevelLabelTween.Toggle();

        //yield return new WaitForSeconds(5f);

        _alreadyLoadingLevel = false;
    }
コード例 #2
0
    public void CollapseMe()
    {
        scaleTweener.Toggle();
        posTweener.Toggle();

        eqButtonGO.GetComponentInChildren <TweenScale> ().Toggle();

        //MiddleWindowCollapser.Instance.currentContentSprite.spriteName = "ic_" + eqIconNum;

        Debug.Log("collapse mee");
    }
コード例 #3
0
ファイル: Car.cs プロジェクト: chongbo2013/backup
    // 训练场
    private void TestScene()
    {
        CameraScript cs = Camera.main.GetComponent <CameraScript> ();

        cs.enabled = false;

        TweenPosition tp = GetComponent <TweenPosition>();

        tp.Toggle();
        EventDelegate.Add(tp.onFinished, GameOver);

        WheelRot [] wheel = gameObject.GetComponentsInChildren <WheelRot> ();
        foreach (WheelRot w in wheel)
        {
            w.carStatus = WheelRot.CarStatus.forward;
        }
    }
コード例 #4
0
 public override void OnBegin(Clip clip)
 {
     base.OnBegin(clip);
     if (Tweener == null)
     {
         m_Status = Status.Error; return;
     }
     if (TweenEndCallback == null)
     {
         TweenEndCallback = new EventDelegate()
         {
             methodName = "OnTweenEnd"
         };
     }
     Tweener.AddOnFinished(TweenEndCallback);
     Tweener.ResetToBeginning();
     Tweener.Toggle();
 }
コード例 #5
0
 // Update is called once per frame
 void OnClick()
 {
     cameraTweener.Toggle();
 }
コード例 #6
0
ファイル: DressItemCategory.cs プロジェクト: rjk1872/Dress
 public void MoveItem()
 {
     tweenPosition.Toggle();
     itemListTweenPosition.Toggle();
 }
コード例 #7
0
    /// <summary>
    /// Show / hide the list of players.
    /// </summary>

    void ToggleList(GameObject go)
    {
        mShown = !mShown;
        tween.Toggle();
        mPlayer.UpdateInfo(mShown);
    }