Example #1
0
 private void initFunct()
 {
     if (target == null)
     {
         target = CurrentPlayerSettings.GetCurrentPlayer().transform;
     }
     SetTarget(target);
 }
Example #2
0
    private void Awake()
    {
        if (m_instance == null)
        {
            m_instance = this;
        }
        else if (m_instance != this)
        {
            Destroy(gameObject);
            return;
        }

        if (AutoFindPlayer && CurrentPlayer != null)
        {
            SetCurrentPlayer();
        }
    }
Example #3
0
    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);
            }
        }
    }