コード例 #1
0
 private void initFunct()
 {
     if (target == null)
     {
         target = CurrentPlayerSettings.GetCurrentPlayer().transform;
     }
     SetTarget(target);
 }
コード例 #2
0
ファイル: SceneStreamTrigger.cs プロジェクト: sdasd30/TSSG
    protected override void onTrigger(GameObject interactor)
    {
        if (interactor != null)
        {
            if (interactor.GetComponent <Attackable>().Alive == false)
            {
                return;
            }
            Debug.Log("Triggered");
            Debug.Log(CurrentPlayerSettings.GetCurrentPlayer());
            Debug.Log(interactor);
            if (CurrentPlayerSettings.GetCurrentPlayer() == interactor)
            {
                Debug.Log("Loading scenes");
                SceneStreamManager.LoadStreamedScenes(ScenesToLoad);
            }

            if (MoveToScene != null)
            {
                SceneStreamManager.MoveObjectToScene(interactor, MoveToScene);
            }
        }
    }