Esempio n. 1
0
 private void Scene_ChangedEvent(object sender, SceneObject so, SceneChangeType type)
 {
     if (type == SceneChangeType.Removed)
     {
         RemoveAllLinksToSO(so);
     }
 }
Esempio n. 2
0
    //=======================================================================================
    // In演出 [秒]指定
    //=======================================================================================
    public void SceneChangeIn(SceneChangeType type, float seconds)
    {
        switch (type)
        {
        case SceneChangeType.FADE:
            //!< フェード用Obj生成
            GameObject obj = Instantiate(fadePrefab);
            // キャンバスに設置
            obj.transform.SetParent(GameObject.Find("Canvas").transform, false);
            //!< コンポーネントの取得
            FadeManager fadeManager = obj.GetComponent <FadeManager>();
            // 外部コルーチン開始
            StartCoroutine(fadeManager.SceneFadeIn(seconds));
            break;

        case SceneChangeType.SLIDE_RIGHT:
            StartCoroutine(SlideIn_RIGHT(seconds));
            break;

        case SceneChangeType.SLIDE_UP:
            StartCoroutine(SlideIn_UP(seconds));
            break;

        default:
            Debug.Log("SceneChangeIn : false");
            break;
        }
    }
Esempio n. 3
0
 public bool MoveScene(string sceneName, float fadeInTime, float fadeOutTime, SceneChangeType type)
 {
     if (_isMoving)
     {
         return(false);
     }
     _fadeType = materials[(int)type];
     StartCoroutine(MoveSceneAnim(sceneName, fadeInTime, fadeOutTime));
     return(true);
 }
Esempio n. 4
0
    public void LoadScene(IStage scene, SceneChangeType changeType = SceneChangeType.CHANGE_FADE)
    {
        if (scene == null)
        {
            throw new Exception("Scene is Null");
        }
        StackData data = sdatas.Peek();

        data.next       = scene;
        data.changeType = changeType;
    }
Esempio n. 5
0
 private void ActiveScene_ChangedEvent(object sender, SceneObject so, SceneChangeType type)
 {
     // [TODO] if we are in a grab, and the object we are grabbing is removed, we need to
     // gracefully abort somehow...
     // Problem is that we do not know at behavior level which object is grabbed...that info
     // is in GrabInfo, which is CaptureData...maybe Behavior can somehow query active CaptureData??
     //
     // (This happens if we do a grab on a multi-select...then we actually selected a TransientGroupSO,
     //  and we start grab, but they immediately discard this GroupSO when we override the gizmo.
     //  So our CaptureData is holding a ref to a SO that has been deleted!)
     //
     //if ( in_grab && type == SceneChangeType.Removed && so ==
 }
 protected void on_scene_changed(object sender, SceneObject so, SceneChangeType type)
 {
     if (type == SceneChangeType.Removed)
     {
         List <Action> deleteActions;
         bool          found = SODeletedActionMap.TryGetValue(so, out deleteActions);
         if (found)
         {
             foreach (var action in deleteActions)
             {
                 action();
             }
         }
     }
 }
Esempio n. 7
0
    //=======================================================================================
    // Out演出 [秒]指定→シーン遷移を開始する
    //=======================================================================================
    public void SceneChangeOut(SceneChangeType type, float seconds, string sceneName)
    {
        switch (type)
        {
        case SceneChangeType.FADE:
            // コルーチン開始→シーン遷移
            StartCoroutine(FadeOutLoadScene(seconds, sceneName));
            break;

        default:
            Debug.Log("SceneChangeOut : false");
            LoadingScene.Instance.LoadScene(sceneName);
            break;
        }
    }
Esempio n. 8
0
 public bool MoveScene(string sceneName, float fadeInTime, float fadeOutTime, SceneChangeType type, bool isPhoton = false)
 {
     if (_isMoving)
     {
         return(false);
     }
     _fadeType = materials[(int)type];
     if (isPhoton)
     {
         StartCoroutine(MoveScenePhotonAnim(sceneName, fadeInTime, fadeOutTime));
     }
     else
     {
         StartCoroutine(MoveSceneAnim(sceneName, fadeInTime, fadeOutTime));
     }
     return(true);
 }
Esempio n. 9
0
        private void ActiveScene_ChangedEvent(object sender, SceneObject so, SceneChangeType type)
        {
            if (so is PrintMeshSO == false)
            {
                return;
            }
            PrintMeshSO printSO = so as PrintMeshSO;

            if (type == SceneChangeType.Removed)
            {
                RemoveMesh(printSO);
            }
            else if (type == SceneChangeType.Added &&
                     printSO.CanAutoUpdateFromSource() &&
                     printSO.AutoUpdateOnSourceFileChange)
            {
                // this should only happen on undo of delete, right?
                AddMesh(printSO);
            }
        }
Esempio n. 10
0
    private void ActiveScene_ChangedEvent(object sender, SceneObject so, SceneChangeType type)
    {
        if (so is PrintMeshSO == false)
        {
            return;
        }

        if (type == SceneChangeType.Added)
        {
            PanelRow newRow = add_new_row(so as PrintMeshSO);
            SORows.Add(so, newRow);
            pending_updates.Add(so);        // in case name changes after this event posts
        }
        else if (type == SceneChangeType.Removed)
        {
            PanelRow row;
            if (SORows.TryGetValue(so, out row))
            {
                GameObject.Destroy(row.panel);
                SORows.Remove(so);
            }
        }
    }
Esempio n. 11
0
 protected virtual void OnSceneChanged(SceneObject so, SceneChangeType type)
 {
     FUtil.SafeSendAnyEvent(ChangedEvent, this, so, type);
 }
Esempio n. 12
0
 private static void Scene_ChangedEvent(object sender, SceneObject so, SceneChangeType type)
 {
     CCActions.UpdateObjectSettings();
     CCActions.SetCurrentSceneModified();
 }