Exemplo n.º 1
0
    public void setDayLight(DayLight val)
    {
        dayLight = val;
        bool custom = Settings.CustomAmbientSetting;

        switch (dayLight)
        {
        case DayLight.Night:
            var obj2 = (GameObject)Instantiate(Resources.Load("flashlight"));
            obj2.transform.parent       = transform;
            obj2.transform.position     = transform.position;
            obj2.transform.rotation     = Quaternion.Euler(353f, 0f, 0f);
            RenderSettings.ambientLight = custom ? new Color(Settings.CustomAmbientColorSetting[2][0], Settings.CustomAmbientColorSetting[2][1], Settings.CustomAmbientColorSetting[2][2]) : FengColor.nightAmbientLight;
            GameObjectCache.Find("mainLight").GetComponent <Light>().color = FengColor.nightLight;
            gameObject.GetComponent <Skybox>().material = skyBoxNIGHT;
            break;

        case DayLight.Day:
            RenderSettings.ambientLight = custom ? new Color(Settings.CustomAmbientColorSetting[0][0], Settings.CustomAmbientColorSetting[0][1], Settings.CustomAmbientColorSetting[0][2]) : FengColor.dayLight;
            GameObjectCache.Find("mainLight").GetComponent <Light>().color = FengColor.dayLight;
            gameObject.GetComponent <Skybox>().material = skyBoxDAY;
            break;

        case DayLight.Dawn:
            RenderSettings.ambientLight = custom ? new Color(Settings.CustomAmbientColorSetting[1][0], Settings.CustomAmbientColorSetting[1][1], Settings.CustomAmbientColorSetting[1][2]) : FengColor.dawnAmbientLight;
            GameObjectCache.Find("mainLight").GetComponent <Light>().color = FengColor.dawnAmbientLight;
            gameObject.GetComponent <Skybox>().material = skyBoxDAWN;
            break;
        }

        snapShotCamera.gameObject.GetComponent <Skybox>().material = gameObject.GetComponent <Skybox>().material;
    }
Exemplo n.º 2
0
 private void reset()
 {
     if (gametype == GAMETYPE.SINGLE)
     {
         GameObjectCache.Find("MultiplayerManager").GetComponent <FengGameManagerMKII>().restartGameSingle();
     }
 }
Exemplo n.º 3
0
 /// <summary>
 /// Enables GameObject using cache.
 /// </summary>
 /// <param name="str"></param>
 public static void EnableObject(string str)
 {
     if (GameObjectCache.Find(str))
     {
         GameObjectCache.Find(str).SetActive(true);
     }
 }
Exemplo n.º 4
0
 /// <summary>
 /// Disables GameObject using cache.
 /// </summary>
 /// <param name="str"></param>
 public static void DisableObject(string str)
 {
     if (GameObjectCache.Find(str))
     {
         GameObjectCache.Find(str).SetActive(false);
     }
 }
Exemplo n.º 5
0
 private void Start()
 {
     GameObjectCache.Find("MultiplayerManager").GetComponent <FengGameManagerMKII>().addCamera(this);
     isPausing    = false;
     inputManager = GameObjectCache.Find("InputManagerController").GetComponent <FengCustomInputs>();
     setDayLight(dayLight);
     locker = GameObjectCache.Find("locker");
     createSnapShotRT();
 }
Exemplo n.º 6
0
    public void snapShotUpdate()
    {
        if (startSnapShotFrameCount)
        {
            snapShotStartCountDownTime -= Time.deltaTime;
            if (snapShotStartCountDownTime <= 0f)
            {
                snapShot2(1);
                startSnapShotFrameCount = false;
            }
        }

        if (hasSnapShot)
        {
            snapShotCountDown -= Time.deltaTime;
            if (snapShotCountDown <= 0f)
            {
                GameObjectCache.Find("UI_IN_GAME").GetComponent <UIReferArray>().panels[0].transform.Find("snapshot1").GetComponent <UITexture>().enabled = false;
                hasSnapShot       = false;
                snapShotCountDown = 0f;
            }
            else if (snapShotCountDown < 1f)
            {
                GameObjectCache.Find("UI_IN_GAME").GetComponent <UIReferArray>().panels[0].transform.Find("snapshot1").GetComponent <UITexture>().mainTexture = snapshot3;
            }
            else if (snapShotCountDown < 1.5f)
            {
                GameObjectCache.Find("UI_IN_GAME").GetComponent <UIReferArray>().panels[0].transform.Find("snapshot1").GetComponent <UITexture>().mainTexture = snapshot2;
            }

            if (snapShotCount < 3)
            {
                snapShotInterval -= Time.deltaTime;
                if (snapShotInterval <= 0f)
                {
                    snapShotInterval = 0.05f;
                    snapShotCount++;
                    snapShot2(snapShotCount);
                }
            }
        }
    }
Exemplo n.º 7
0
    public void update()
    {
        if (Settings.MinimapSetting && RCSettings.globalDisableMinimap != 1 && !Minimap.instance.isEnabled)
        {
            gameObject.GetComponent <Minimap>().SetEnabled(true);
            Minimap.TryRecaptureInstance();
        }

        if (flashDuration > 0f)
        {
            flashDuration -= Time.deltaTime;
            if (flashDuration <= 0f)
            {
                flashDuration = 0f;
            }

            GameObjectCache.Find("flash").GetComponent <UISprite>().alpha = flashDuration * 0.5f;
        }

        if (gametype == GAMETYPE.STOP)
        {
            Screen.showCursor = true;
            Screen.lockCursor = false;
        }
        else
        {
            if (gametype != GAMETYPE.SINGLE && gameOver)
            {
                if (inputManager.isInputDown[InputCode.attack1])
                {
                    if (spectatorMode)
                    {
                        setSpectorMode(false);
                    }
                    else
                    {
                        setSpectorMode(true);
                    }
                }

                if (Input.GetKeyDown(KeyCode.Alpha2))
                {
                    currentPeekPlayerIndex++;
                    var length = GameObject.FindGameObjectsWithTag("Player").Length;
                    if (currentPeekPlayerIndex >= length)
                    {
                        currentPeekPlayerIndex = 0;
                    }

                    if (length > 0)
                    {
                        setMainObject(GameObject.FindGameObjectsWithTag("Player")[currentPeekPlayerIndex]);
                        setSpectorMode(false);
                        lockAngle = false;
                    }
                }

                if (Input.GetKeyDown(KeyCode.Alpha1))
                {
                    currentPeekPlayerIndex--;
                    var num2 = GameObject.FindGameObjectsWithTag("Player").Length;
                    if (currentPeekPlayerIndex >= num2)
                    {
                        currentPeekPlayerIndex = 0;
                    }

                    if (currentPeekPlayerIndex < 0)
                    {
                        currentPeekPlayerIndex = num2;
                    }

                    if (num2 > 0)
                    {
                        setMainObject(GameObject.FindGameObjectsWithTag("Player")[currentPeekPlayerIndex]);
                        setSpectorMode(false);
                        lockAngle = false;
                    }
                }

                if (spectatorMode)
                {
                    return;
                }
            }

            if (inputManager.isInputDown[InputCode.pause])
            {
                if (isPausing)
                {
                    if (main_object != null)
                    {
                        var position = transform.position;
                        position           = head == null ? main_object.transform.position : head.transform.position;
                        position          += Vector3.up * heightMulti;
                        transform.position = Vector3.Lerp(transform.position, position - transform.forward * 5f, 0.2f);
                    }

                    return;
                }

                isPausing = !isPausing;
                if (isPausing)
                {
                    if (gametype == GAMETYPE.SINGLE)
                    {
                        Time.timeScale = 0f;
                    }

                    GameObjectCache.Find("InputManagerController").GetComponent <FengCustomInputs>().menuOn = true;
                    Page.GetInstance <PauseMenu>().Enable();
                    Screen.showCursor = true;
                    Screen.lockCursor = false;
                }
            }

            if (needSetHUD)
            {
                needSetHUD = false;
                setHUDposition();
                Screen.lockCursor = !Screen.lockCursor;
                Screen.lockCursor = !Screen.lockCursor;
            }

            if (inputManager.isInputDown[InputCode.fullscreen])
            {
                Screen.fullScreen = !Screen.fullScreen;
                if (Screen.fullScreen)
                {
                    Screen.SetResolution(960, 600, false);
                }
                else
                {
                    Screen.SetResolution(Screen.currentResolution.width, Screen.currentResolution.height, true);
                }

                needSetHUD = true;
                Minimap.OnScreenResolutionChanged();
            }

            if (inputManager.isInputDown[InputCode.restart])
            {
                reset();
            }

            if (main_object != null)
            {
                RaycastHit hit;
                if (inputManager.isInputDown[InputCode.camera])
                {
                    switch (cameraMode)
                    {
                    case CAMERA_TYPE.ORIGINAL:
                        if (Settings.CameraTypeSettings[2])
                        {
                            cameraMode        = CAMERA_TYPE.WOW;
                            Screen.lockCursor = false;
                        }
                        else if (Settings.CameraTypeSettings[1])
                        {
                            cameraMode        = CAMERA_TYPE.TPS;
                            Screen.lockCursor = true;
                        }
                        else if (Settings.CameraTypeSettings[3])
                        {
                            cameraMode        = CAMERA_TYPE.OLDTPS;
                            Screen.lockCursor = true;
                        }

                        break;

                    case CAMERA_TYPE.WOW:
                        if (Settings.CameraTypeSettings[1])
                        {
                            cameraMode        = CAMERA_TYPE.TPS;
                            Screen.lockCursor = true;
                        }
                        else if (Settings.CameraTypeSettings[3])
                        {
                            cameraMode        = CAMERA_TYPE.OLDTPS;
                            Screen.lockCursor = true;
                        }
                        else if (Settings.CameraTypeSettings[0])
                        {
                            cameraMode        = CAMERA_TYPE.ORIGINAL;
                            Screen.lockCursor = false;
                        }

                        break;

                    case CAMERA_TYPE.TPS:
                        if (Settings.CameraTypeSettings[3])
                        {
                            cameraMode        = CAMERA_TYPE.OLDTPS;
                            Screen.lockCursor = true;
                        }
                        else if (Settings.CameraTypeSettings[0])
                        {
                            cameraMode        = CAMERA_TYPE.ORIGINAL;
                            Screen.lockCursor = false;
                        }
                        else if (Settings.CameraTypeSettings[2])
                        {
                            cameraMode        = CAMERA_TYPE.WOW;
                            Screen.lockCursor = false;
                        }

                        break;

                    case CAMERA_TYPE.OLDTPS:
                        if (Settings.CameraTypeSettings[0])
                        {
                            cameraMode        = CAMERA_TYPE.ORIGINAL;
                            Screen.lockCursor = false;
                        }
                        else if (Settings.CameraTypeSettings[2])
                        {
                            cameraMode        = CAMERA_TYPE.WOW;
                            Screen.lockCursor = false;
                        }
                        else if (Settings.CameraTypeSettings[1])
                        {
                            cameraMode        = CAMERA_TYPE.TPS;
                            Screen.lockCursor = true;
                        }

                        break;
                    }

                    if ((int)FengGameManagerMKII.settings[245] == 1 || main_object.GetComponent <HERO>() == null)
                    {
                        Screen.showCursor = false;
                    }
                }

                if (inputManager.isInputDown[InputCode.hideCursor])
                {
                    Screen.showCursor = !Screen.showCursor;
                }

                if (inputManager.isInputDown[InputCode.focus])
                {
                    triggerAutoLock = !triggerAutoLock;
                    if (triggerAutoLock)
                    {
                        lockTarget = findNearestTitan();
                        if (closestDistance >= 150f)
                        {
                            lockTarget      = null;
                            triggerAutoLock = false;
                        }
                    }
                }

                if (gameOver && main_object != null)
                {
                    if (FengGameManagerMKII.inputRC.isInputHumanDown(InputCodeRC.liveCam))
                    {
                        if ((int)FengGameManagerMKII.settings[263] == 0)
                        {
                            FengGameManagerMKII.settings[263] = 1;
                        }
                        else
                        {
                            FengGameManagerMKII.settings[263] = 0;
                        }
                    }

                    var component = main_object.GetComponent <HERO>();
                    if (component != null && (int)FengGameManagerMKII.settings[263] == 1 && component.GetComponent <SmoothSyncMovement>().enabled&& component.isPhotonCamera)
                    {
                        CameraMovementLive(component);
                    }
                    else if (lockAngle)
                    {
                        transform.rotation = Quaternion.Lerp(transform.rotation, main_object.transform.rotation, 0.2f);
                        transform.position = Vector3.Lerp(transform.position, main_object.transform.position - main_object.transform.forward * 5f, 0.2f);
                    }
                    else
                    {
                        camareMovement();
                    }
                }
                else
                {
                    camareMovement();
                }

                if (triggerAutoLock && lockTarget != null)
                {
                    var z         = this.transform.eulerAngles.z;
                    var transform = lockTarget.transform.Find("Amarture/Core/Controller_Body/hip/spine/chest/neck");
                    var vector2   = transform.position - (head == null ? main_object.transform.position : head.transform.position);
                    vector2.Normalize();
                    lockCameraPosition      = head == null ? main_object.transform.position : head.transform.position;
                    lockCameraPosition     -= vector2 * distance * distanceMulti * distanceOffsetMulti;
                    lockCameraPosition     += Vector3.up * 3f * heightMulti * distanceOffsetMulti;
                    this.transform.position = Vector3.Lerp(this.transform.position, lockCameraPosition, Time.deltaTime * 4f);
                    if (head != null)
                    {
                        this.transform.LookAt(head.transform.position * 0.8f + transform.position * 0.2f);
                    }
                    else
                    {
                        this.transform.LookAt(main_object.transform.position * 0.8f + transform.position * 0.2f);
                    }

                    this.transform.localEulerAngles = new Vector3(this.transform.eulerAngles.x, this.transform.eulerAngles.y, z);
                    Vector2 vector3 = camera.WorldToScreenPoint(transform.position - transform.forward * lockTarget.transform.localScale.x);
                    locker.transform.localPosition = new Vector3(vector3.x - Screen.width * 0.5f, vector3.y - Screen.height * 0.5f, 0f);
                    if (lockTarget.GetComponent <TITAN>() != null && lockTarget.GetComponent <TITAN>().hasDie)
                    {
                        lockTarget = null;
                    }
                }
                else
                {
                    locker.transform.localPosition = new Vector3(0f, -Screen.height * 0.5f - 50f, 0f);
                }

                var end        = head == null ? main_object.transform.position : head.transform.position;
                var vector5    = (head == null ? main_object.transform.position : head.transform.position) - this.transform.position;
                var normalized = vector5.normalized;
                end -= distance * normalized * distanceMulti;
                LayerMask mask  = 1 << LayerMask.NameToLayer("Ground");
                LayerMask mask2 = 1 << LayerMask.NameToLayer("EnemyBox");
                LayerMask mask3 = mask | mask2;
                if (head != null)
                {
                    if (Physics.Linecast(head.transform.position, end, out hit, mask))
                    {
                        transform.position = hit.point;
                    }
                    else if (Physics.Linecast(head.transform.position - normalized * distanceMulti * 3f, end, out hit, mask2))
                    {
                        transform.position = hit.point;
                    }

                    Debug.DrawLine(head.transform.position - normalized * distanceMulti * 3f, end, Color.red);
                }
                else if (Physics.Linecast(main_object.transform.position + Vector3.up, end, out hit, mask3))
                {
                    transform.position = hit.point;
                }

                shakeUpdate();
            }
        }
    }
Exemplo n.º 8
0
    public void snapShot2(int index)
    {
        Vector3    vector;
        RaycastHit hit;

        snapShotCamera.transform.position = head == null ? main_object.transform.position : head.transform.position;
        var transform = snapShotCamera.transform;

        transform.position += Vector3.up * heightMulti;
        var transform2 = snapShotCamera.transform;

        transform2.position -= Vector3.up * 1.1f;
        var worldPosition = vector = snapShotCamera.transform.position;
        var vector3       = (worldPosition + snapShotTargetPosition) * 0.5f;

        snapShotCamera.transform.position = vector3;
        worldPosition = vector3;
        snapShotCamera.transform.LookAt(snapShotTargetPosition);
        if (index == 3)
        {
            snapShotCamera.transform.RotateAround(this.transform.position, Vector3.up, Random.Range(-180f, 180f));
        }
        else
        {
            snapShotCamera.transform.RotateAround(this.transform.position, Vector3.up, Random.Range(-20f, 20f));
        }

        snapShotCamera.transform.LookAt(worldPosition);
        snapShotCamera.transform.RotateAround(worldPosition, this.transform.right, Random.Range(-20f, 20f));
        var num = Vector3.Distance(snapShotTargetPosition, vector);

        if (snapShotTarget != null && snapShotTarget.GetComponent <TITAN>() != null)
        {
            num += (index - 1) * snapShotTarget.transform.localScale.x * 10f;
        }

        var transform3 = snapShotCamera.transform;

        transform3.position -= snapShotCamera.transform.forward * Random.Range(num + 3f, num + 10f);
        snapShotCamera.transform.LookAt(worldPosition);
        snapShotCamera.transform.RotateAround(worldPosition, this.transform.forward, Random.Range(-30f, 30f));
        var end     = head == null ? main_object.transform.position : head.transform.position;
        var vector5 = (head == null ? main_object.transform.position : head.transform.position) - snapShotCamera.transform.position;

        end -= vector5;
        LayerMask mask  = 1 << LayerMask.NameToLayer("Ground");
        LayerMask mask2 = 1 << LayerMask.NameToLayer("EnemyBox");
        LayerMask mask3 = mask | mask2;

        if (head != null)
        {
            if (Physics.Linecast(head.transform.position, end, out hit, mask))
            {
                snapShotCamera.transform.position = hit.point;
            }
            else if (Physics.Linecast(head.transform.position - vector5 * distanceMulti * 3f, end, out hit, mask3))
            {
                snapShotCamera.transform.position = hit.point;
            }
        }
        else if (Physics.Linecast(main_object.transform.position + Vector3.up, end, out hit, mask3))
        {
            snapShotCamera.transform.position = hit.point;
        }

        switch (index)
        {
        case 1:
            snapshot1 = RTImage(snapShotCamera.GetComponent <Camera>());
            SnapShotSaves.addIMG(snapshot1, snapShotDmg);
            break;

        case 2:
            snapshot2 = RTImage(snapShotCamera.GetComponent <Camera>());
            SnapShotSaves.addIMG(snapshot2, snapShotDmg);
            break;

        case 3:
            snapshot3 = RTImage(snapShotCamera.GetComponent <Camera>());
            SnapShotSaves.addIMG(snapshot3, snapShotDmg);
            break;
        }

        snapShotCount     = index;
        hasSnapShot       = true;
        snapShotCountDown = 2f;
        if (index == 1)
        {
            GameObjectCache.Find("UI_IN_GAME").GetComponent <UIReferArray>().panels[0].transform.Find("snapshot1").GetComponent <UITexture>().mainTexture             = snapshot1;
            GameObjectCache.Find("UI_IN_GAME").GetComponent <UIReferArray>().panels[0].transform.Find("snapshot1").GetComponent <UITexture>().transform.localScale    = new Vector3(Screen.width * 0.4f, Screen.height * 0.4f, 1f);
            GameObjectCache.Find("UI_IN_GAME").GetComponent <UIReferArray>().panels[0].transform.Find("snapshot1").GetComponent <UITexture>().transform.localPosition = new Vector3(-Screen.width * 0.225f, Screen.height * 0.225f, 0f);
            GameObjectCache.Find("UI_IN_GAME").GetComponent <UIReferArray>().panels[0].transform.Find("snapshot1").GetComponent <UITexture>().transform.rotation      = Quaternion.Euler(0f, 0f, 10f);
            if (Settings.SnapshotsShowInGameSetting)
            {
                GameObjectCache.Find("UI_IN_GAME").GetComponent <UIReferArray>().panels[0].transform.Find("snapshot1").GetComponent <UITexture>().enabled = true;
            }
            else
            {
                GameObjectCache.Find("UI_IN_GAME").GetComponent <UIReferArray>().panels[0].transform.Find("snapshot1").GetComponent <UITexture>().enabled = false;
            }
        }
    }
Exemplo n.º 9
0
 public void setSpectorMode(bool val)
 {
     spectatorMode = val;
     GameObjectCache.Find("MainCamera").GetComponent <SpectatorMovement>().disable = !val;
     GameObjectCache.Find("MainCamera").GetComponent <MouseLook>().disable         = !val;
 }
Exemplo n.º 10
0
    public void setHUDposition()
    {
        GameObjectCache.Find("Flare").transform.localPosition = new Vector3((int)(-Screen.width * 0.5f) + 14, (int)(-Screen.height * 0.5f), 0f);
        var obj2 = GameObjectCache.Find("LabelInfoBottomRight");

        obj2.transform.localPosition = new Vector3((int)(Screen.width * 0.5f), (int)(-Screen.height * 0.5f), 0f);
        if (Settings.LegacyLabelsSetting)
        {
            obj2.GetComponent <UILabel>().text = "Pause : " + GameObject.Find("InputManagerController").GetComponent <FengCustomInputs>().inputString[InputCode.pause] + " ";
        }
        else
        {
            Labels.BottomRight = "Pause : " + GameObjectCache.Find("InputManagerController").GetComponent <FengCustomInputs>().inputString[InputCode.pause];
        }
        GameObjectCache.Find("LabelInfoTopCenter").transform.localPosition = new Vector3(0f, (int)(Screen.height * 0.5f), 0f);
        GameObjectCache.Find("LabelInfoTopRight").transform.localPosition  = new Vector3((int)(Screen.width * 0.5f), (int)(Screen.height * 0.5f), 0f);
        GameObjectCache.Find("LabelNetworkStatus").transform.localPosition = new Vector3((int)(-Screen.width * 0.5f), (int)(Screen.height * 0.5f), 0f);
        GameObjectCache.Find("LabelInfoTopLeft").transform.localPosition   = new Vector3((int)(-Screen.width * 0.5f), (int)(Screen.height * 0.5f - 20f), 0f);
        GameObjectCache.Find("Chatroom").transform.localPosition           = new Vector3((int)(-Screen.width * 0.5f), (int)(-Screen.height * 0.5f), 0f);
        if (GameObjectCache.Find("Chatroom") != null)
        {
            GameObjectCache.Find("Chatroom").GetComponent <InRoomChat>().SetPosition();
        }

        if (!usingTitan || gametype == GAMETYPE.SINGLE)
        {
            GameObjectCache.Find("skill_cd_bottom").transform.localPosition      = new Vector3(0f, (int)(-Screen.height * 0.5f + 5f), 0f);
            GameObjectCache.Find("GasUI").transform.localPosition                = GameObjectCache.Find("skill_cd_bottom").transform.localPosition;
            GameObjectCache.Find("stamina_titan").transform.localPosition        = new Vector3(0f, 9999f, 0f);
            GameObjectCache.Find("stamina_titan_bottom").transform.localPosition = new Vector3(0f, 9999f, 0f);
        }
        else
        {
            var vector = new Vector3(0f, 9999f, 0f);
            GameObjectCache.Find("skill_cd_bottom").transform.localPosition      = vector;
            GameObjectCache.Find("skill_cd_armin").transform.localPosition       = vector;
            GameObjectCache.Find("skill_cd_eren").transform.localPosition        = vector;
            GameObjectCache.Find("skill_cd_jean").transform.localPosition        = vector;
            GameObjectCache.Find("skill_cd_levi").transform.localPosition        = vector;
            GameObjectCache.Find("skill_cd_marco").transform.localPosition       = vector;
            GameObjectCache.Find("skill_cd_mikasa").transform.localPosition      = vector;
            GameObjectCache.Find("skill_cd_petra").transform.localPosition       = vector;
            GameObjectCache.Find("skill_cd_sasha").transform.localPosition       = vector;
            GameObjectCache.Find("GasUI").transform.localPosition                = vector;
            GameObjectCache.Find("stamina_titan").transform.localPosition        = new Vector3(-160f, (int)(-Screen.height * 0.5f + 15f), 0f);
            GameObjectCache.Find("stamina_titan_bottom").transform.localPosition = new Vector3(-160f, (int)(-Screen.height * 0.5f + 15f), 0f);
        }

        if (main_object != null && main_object.GetComponent <HERO>() != null)
        {
            if (gametype == GAMETYPE.SINGLE)
            {
                main_object.GetComponent <HERO>().setSkillHUDPosition();
            }
            else if (main_object.GetPhotonView() != null && main_object.GetPhotonView().isMine)
            {
                main_object.GetComponent <HERO>().setSkillHUDPosition();
            }
        }

        if (stereoType == STEREO_3D_TYPE.SIDE_BY_SIDE)
        {
            gameObject.GetComponent <Camera>().aspect = Screen.width / Screen.height;
        }

        createSnapShotRT();
    }
Exemplo n.º 11
0
 public void flashBlind()
 {
     GameObjectCache.Find("flash").GetComponent <UISprite>().alpha = 1f;
     flashDuration = 2f;
 }
Exemplo n.º 12
0
 public static void GetPosition()
 {
     string[] msg = { "Your position:\n", "\nX", " - ", $"{GameObjectCache.Find("MainCamera").GetComponent<IN_GAME_MAIN_CAMERA>().main_object.transform.position.x.ToString()}" + "\nY", " - ", $"{GameObjectCache.Find("MainCamera").GetComponent<IN_GAME_MAIN_CAMERA>().main_object.transform.position.y.ToString()}" + "\nZ", " - ", $"{GameObjectCache.Find("MainCamera").GetComponent<IN_GAME_MAIN_CAMERA>().main_object.transform.position.z.ToString()}" };
     SystemMessageLocal(msg);
 }