protected override void OnEnter(PlayerInfo player)
        {
            if (TriggerOwner._state != CosmicInflationController.State.ReadyToCollapse)
            {
                return;
            }

            if (player.IsLocalPlayer)
            {
                AttachedObject.OnEntry -= OnEnterEvent;

                AttachedObject.SetTriggerActivation(false);
                TriggerOwner._probeDestroyTrigger.SetTriggerActivation(false);

                var repelVolume = (WhiteHoleFluidVolume)TriggerOwner._repelVolume;
                repelVolume._flowSpeed        = -repelVolume._flowSpeed;
                repelVolume._massiveFlowSpeed = -repelVolume._massiveFlowSpeed;
                repelVolume.SetVolumeActivation(true);
                QSBPlayerManager.HideAllPlayers();

                ReticleController.Hide();
                Locator.GetFlashlight().TurnOff(false);
                Locator.GetPromptManager().SetPromptsVisible(false);
                OWInput.ChangeInputMode(InputMode.None);
            }
            else
            {
                player.SetVisible(false, .3f);
            }

            if (Occupants.Count == QSBPlayerManager.PlayerList.Count)
            {
                StartCollapse();
            }
        }
 void Start()
 {
     cam               = Camera.main;
     eyeGO             = GameObject.FindGameObjectWithTag("Player");
     eyeController     = eyeGO.GetComponent <EyeController>();
     reticleController = GameObject.FindGameObjectWithTag("Reticle").GetComponent <ReticleController>();
     IsEyeActive       = false;
 }
示例#3
0
        public override void OnReceiveRemote()
        {
            var controller = QSBWorldSync.GetUnityObjects <GalaxyMapController>().First();

            controller.enabled = true;
            Locator.GetPlayerController().SetColliderActivation(false);
            controller._endlessObservatoryVolume.SetActivation(false);
            controller._forestOfGalaxiesVolume.SetTriggerActivation(false);
            ReticleController.Hide();
            controller._zoomSpeed = 50f;
            Locator.GetPlayerBody().AddVelocityChange(-Locator.GetPlayerCamera().transform.forward *controller._zoomSpeed);
            controller._origEyePos = controller._eyeTransform.localPosition;
            controller._audioSource.Play();
            RumbleManager.PlayGalaxyZoom();
            Locator.GetEyeStateManager().SetState(EyeState.ZoomOut);
        }
示例#4
0
    //TODO: THINK ABOUT THIS...WE NEED TO ACCOUNT FOR CPU PLACED WALLS AS WELL.

    /// <summary>
    /// Creates an action representing the player setting a wall into place
    /// </summary>
    /// <param name="playerAnchor">Anchor that the player has set</param>
    /// <param name="cpuAnchors">Any anchors generated by the editor as a result of symmetry setting</param>
    /// <param name="symmetry">Symmetry at the time of setting the wall</param>
    /// <param name="reticle">Editor reticle</param>
    public ActionSetWall(GameWallAnchor playerAnchor, List <GameWallAnchor> cpuAnchors, SymmetricWallPlacer wallPlacer, SymmetricWallPlacer.WallSymmetry symmetry, ReticleController reticle)
    {
        //TODO: So...it might have been a good idea to make wall symmetry its own action, but I don't want the player spamming symmetry actions (possibly also clearing an action they wanted kept)
        this.wallPlacer = wallPlacer;
        this.symmetry   = symmetry;
        this.reticle    = reticle;
        reticlePosition = reticle.transform.position;

        playerWallAnchor          = playerAnchor;
        playerWallData.Position   = playerAnchor.transform.position;
        playerWallData.LocalScale = playerAnchor.LocalScale;

        foreach (GameWallAnchor anchor in cpuAnchors)
        {
            cpuWallAnchors.Add(anchor);
            WallAnchorData data;
            data.Position   = anchor.transform.position;
            data.LocalScale = anchor.LocalScale;
            cpuWallData.Add(data);
        }
    }
示例#5
0
 void Awake()
 {
     singleton = this;
 }
示例#6
0
 void Start()
 {
     cam = Camera.main;
     reticleController = GameObject.FindObjectOfType <ReticleController>();
 }
 void Awake()
 {
     _instance = this;
 }
示例#8
0
 public void Awake()
 {
     singleton = this;
 }
 void SetReticleParameters()
 {
     reticleController = reticle.GetComponent <ReticleController>();
     reticleController.reticleDepth             = Camera.main.WorldToScreenPoint(this.transform.transform.position).z;
     reticleController.responsivenessPercentage = GetResponsivenessPercentage();
 }
示例#10
0
 /// <summary>
 /// Creates an instance of this action
 /// </summary>
 /// <param name="reticle">The editor reticle</param>
 /// <param name="anchor">The wall placed</param>
 public ActionPlaceWall(ReticleController reticle, GameWallAnchor anchor)
 {
     this.reticle    = reticle;
     reticlePosition = reticle.transform.position;
     wallAnchor      = anchor;
 }