コード例 #1
0
 void Awake()
 {
     if (gc == null)
     {
         gc = this;
     }
     else
     {
         // if this one's a duplicate, destroy
         Destroy(this.gameObject);
         return;
     }
     DontDestroyOnLoad(this);
     titleText         = editorTitleText;
     dialogueUI        = GetComponentInChildren <DialogueUI>();
     signUI            = GetComponentInChildren <SignUI>();
     pc                = GetComponentInChildren <PlayerController>();
     rm                = GetComponent <RespawnManager>();
     playerFollower    = gc.GetComponentInChildren <PlayerFollower>();
     save              = gc.GetComponent <SaveWrapper>().save;
     blackoutUI        = GetComponentInChildren <BlackFadeUI>();
     pauseUI           = GetComponentInChildren <PauseUI>();
     abilityUIAnimator = GameObject.Find("AbilityGetUI").GetComponent <Animator>();
     inventory         = gc.GetComponentInChildren <InventoryController>();
     parallaxOption    = gc.GetComponentInChildren <ParallaxOption>();
     bossHealthUI      = GameObject.Find("BossHealthUI").GetComponent <BarUI>();
     bossHealthUI.gameObject.SetActive(false);
     playerMenu     = GameObject.Find("PlayerMenu");
     binarySaver    = gc.GetComponent <BinarySaver>();
     saveWrapper    = gc.GetComponent <SaveWrapper>();
     audioListener  = gc.GetComponentInChildren <AudioListener>();
     bossFightIntro = gc.GetComponentInChildren <BossFightIntro>(includeInactive: true);
 }
コード例 #2
0
 void OnEnable()
 {
     gameCamera             = GameObject.Find("OVRCameraRig");
     options                = gameCamera.GetComponent <ParallaxOption>();
     cameraTransform        = gameCamera.transform;
     previousCameraPosition = cameraTransform.position;
 }
コード例 #3
0
 void Awake()
 {
     if (gc == null)
     {
         gc = this;
     }
     else
     {
         // if this one's a duplicate, destroy
         Destroy(this.gameObject);
         return;
     }
     DontDestroyOnLoad(this);
     titleText         = editorTitleText;
     dialogueUI        = GetComponentInChildren <DialogueUI>();
     signUI            = GetComponentInChildren <SignUI>();
     pc                = GetComponentInChildren <PlayerController>();
     rm                = GetComponent <RespawnManager>();
     playerFollower    = gc.GetComponentInChildren <PlayerFollower>();
     save              = gc.GetComponent <Save>();
     blackoutUI        = GetComponentInChildren <BlackFadeUI>();
     pauseUI           = gc.transform.Find("PixelCanvas").transform.Find("PauseUI").GetComponent <Animator>();
     abilityUIAnimator = gc.transform.Find("PixelCanvas").transform.Find("AbilityGetUI").GetComponent <Animator>();
     inventory         = gc.GetComponentInChildren <InventoryController>();
     parallaxOption    = gc.GetComponentInChildren <ParallaxOption>();
 }
コード例 #4
0
    // When enabled, find the main camera
    private void OnEnable()
    {
        GameObject gameCamera = Camera.main.gameObject;

        options                = gameCamera.GetComponent <ParallaxOption>();
        cameraTransform        = gameCamera.transform;
        previousCameraPosition = cameraTransform.position;
    }
コード例 #5
0
    void OnEnable()
    {
        GameObject gameCamera = FindObjectOfType <ParallaxOption>().gameObject;

        options                = gameCamera.GetComponent <ParallaxOption>();
        cameraTransform        = gameCamera.transform;
        previousCameraPosition = cameraTransform.position;
    }
コード例 #6
0
    void Start()
    {
        GameObject gameCamera = GameObject.Find("Main Camera");

        options                = gameCamera.GetComponent <ParallaxOption>();
        cameraTransform        = gameCamera.transform;
        previousCameraPosition = cameraTransform.position;
    }
コード例 #7
0
    void Start()
    {
        GameObject gameCamera = GameObject.Find("Main Camera");

        if (gameCamera == null)
        {
            return;
        }
        options                = gameCamera.GetComponent <ParallaxOption>();
        cameraTransform        = gameCamera.transform;
        previousCameraPosition = Vector2.zero;
        RoundChildren(this.transform);
    }
コード例 #8
0
        #pragma warning restore 0649

    void Awake()
    {
        gc                = this;
        titleText         = editorTitleText;
        dialogueUI        = GetComponentInChildren <DialogueUI>();
        signUI            = GetComponentInChildren <SignUI>();
        pc                = GetComponentInChildren <PlayerController>();
        rm                = GetComponent <RespawnManager>();
        playerFollower    = gc.GetComponentInChildren <PlayerFollower>();
        blackoutUI        = GetComponentInChildren <BlackFadeUI>();
        pauseUI           = GetComponentInChildren <PauseUI>();
        abilityUIAnimator = GameObject.Find("AbilityGetUI").GetComponent <Animator>();
        inventory         = gc.GetComponentInChildren <InventoryController>();
        parallaxOption    = gc.GetComponentInChildren <ParallaxOption>();
        bossHealthUI      = GameObject.Find("BossHealthUI").GetComponent <BarUI>();
        bossHealthUI.gameObject.SetActive(false);
        playerMenu     = GameObject.Find("PlayerMenu");
        audioListener  = gc.GetComponentInChildren <AudioListener>();
        bossFightIntro = gc.GetComponentInChildren <BossFightIntro>(includeInactive: true);

#if UNITY_EDITOR
        EditorApplication.playModeStateChanged += OnPlayModeChange;
#endif
    }
コード例 #9
0
    private void OnValidate()
    {
        GameObject gameCamera = Camera.main.gameObject;

        Options = Options ?? gameCamera.GetComponent <ParallaxOption>();
    }
コード例 #10
0
 void Awake()
 {
     options = (ParallaxOption)target;
 }
コード例 #11
0
ファイル: ParallaxOptionEditor.cs プロジェクト: Leafgame/Leaf
 protected virtual void Awake()
 {
     _options = (ParallaxOption)target;
 }