예제 #1
0
    private void Start()
    {
        lightingImageEffect_ = SceneGlobals.Instance.LightingImageEffect;
        startLight_          = LightingImageEffect.Instance.CurrentValues;
        baseAmbientColor_    = LightingImageEffect.Instance.CurrentValues.AmbientLight;
        ScaleAmbientLight(0.6f);
        nextFlash = Time.time + 2 + Random.value;

        CurrentRunData.Instance.Boss1Attempts++;

        golemKing_ = FindObjectOfType <GolemKingController>();

        miniGolems_ = FindObjectsOfType <MiniGolemController>();
        golems_     = FindObjectsOfType <GolemController>();
        for (int i = 0; i < golems_.Length; ++i)
        {
            golems_[i].gameObject.SetActive(false);
        }

        GameEvents.OnGolemKingCallingForHelp += GameEvents_OnGolemKingCallingForHelp;
        GameEvents.OnAllEnemiesKilled        += GameEvents_OnAllEnemiesKilled;

        nextLevelPortal_ = GameSceneLogic.Instance.NextLevelPortal;
        nextLevelPortal_.gameObject.SetActive(true);
        nextLevelPortal_.transform.position = Vector3.right * 800;

        Chest.SetActive(false);
    }
예제 #2
0
    IEnumerator Start()
    {
        LoadingCanvas.gameObject.SetActive(true);
        ShowPlayerName(false);
        HumanPlayerController.CanShoot = false;
        ControlsText.gameObject.SetActive(GameProgressData.CurrentProgress.NumberOfDeaths == 0);

        while (!PlayFabFacade.Instance.LoginProcessComplete)
        {
            yield return(null);
        }

        Weapons.LoadWeaponsFromResources();
        Enemies.LoadEnemiesFromResources();

        QuestPortal.SetActive(false);

        LoadingCanvas.gameObject.SetActive(false);
        IntroCanvas.gameObject.SetActive(true);

        string ghostPath = PlayerPrefs.GetString("LatestCampPath");

        try
        {
            if (string.IsNullOrWhiteSpace(ghostPath))
            {
                PlayFabFacade.AllData.InfoResultPayload.TitleData.TryGetValue("DefaultCampGhost", out ghostPath);
            }

            GhostPath.FromString(ghostPath);
            if (GhostPath.HasPath)
            {
                var ghost = Instantiate(GhostPlayerPrefab, Vector3.left * 10000, Quaternion.identity);
                ghostScript_ = ghost.GetComponent <GhostPlayerScript>();
            }
        }
        catch (System.Exception) { }

        camPos_              = SceneGlobals.Instance.CameraPositioner;
        camShake_            = SceneGlobals.Instance.CameraShake;
        lightingImageEffect_ = SceneGlobals.Instance.LightingImageEffect;
        mapAccess_           = SceneGlobals.Instance.MapAccess;
        mapScript_           = SceneGlobals.Instance.MapScript;

        lightingImageEffect_.Darkness = 0.0f;
        SceneGlobals.Instance.GraveStoneManager.CreateGravestones();

        mapAccess_.BuildCollisionMapFromWallTilemap(mapScript_.FloorTileMap);
        SetLighting(MenuLightingSettings);

        CreateCharacters();
        ActivateLatestSelectedCharacter();

        StartCoroutine(InMenu());
    }
예제 #3
0
    private void Awake()
    {
        Instance = this;

        CurrentValues = new LightingEffectSettings();
        target_       = new LightingEffectSettings();

        id_LightingTex        = Shader.PropertyToID("_LightingTex");
        id_Brightness         = Shader.PropertyToID("_Brightness");
        id_MonochromeAmount   = Shader.PropertyToID("_MonochromeAmount");
        id_MonochromeFactorR  = Shader.PropertyToID("_MonochromeFactorR");
        id_MonochromeFactorG  = Shader.PropertyToID("_MonochromeFactorG");
        id_MonochromeFactorB  = Shader.PropertyToID("_MonochromeFactorB");
        id_MonochromeDisplayR = Shader.PropertyToID("_MonochromeDisplayR");
        id_MonochromeDisplayG = Shader.PropertyToID("_MonochromeDisplayG");
        id_MonochromeDisplayB = Shader.PropertyToID("_MonochromeDisplayB");
        id_Darkness           = Shader.PropertyToID("_Darkness");
        id_AspectRatio        = Shader.PropertyToID("_AspectRatio");

        SetBaseColor(StartValues);
    }
예제 #4
0
    void Awake()
    {
        MapLayer               = LayerMask.NameToLayer("Map");
        PlayerLayer            = LayerMask.NameToLayer("Player");
        PlayerDamageLayer      = LayerMask.NameToLayer("PlayerDamage");
        PlayerInteractionLayer = LayerMask.NameToLayer("PlayerInteraction");
        EnemyLayer             = LayerMask.NameToLayer("Enemy");
        EnemyNoWallsLayer      = LayerMask.NameToLayer("EnemyNoWalls");
        EnemyDamageLayer       = LayerMask.NameToLayer("EnemyDamage");
        DeadEnemyLayer         = LayerMask.NameToLayer("DeadEnemy");
        EnemyDeadOrAliveMask   = (1 << EnemyLayer) + (1 << EnemyNoWallsLayer) + (1 << DeadEnemyLayer);
        EnemyAliveMask         = (1 << EnemyLayer) + (1 << EnemyNoWallsLayer);

        CameraPositioner    = FindObjectOfType <CameraPositioner>();
        CameraShake         = FindObjectOfType <CameraShake>();
        AudioManager        = FindObjectOfType <AudioManager>();
        MapScript           = FindObjectOfType <MapScript>();
        MapAccess           = (IMapAccess)MapScript;
        ParticleScript      = FindObjectOfType <ParticleScript>();
        DebugLinesScript    = FindObjectOfType <DebugLinesScript>();
        LightingImageEffect = FindObjectOfType <LightingImageEffect>();
        LightingCamera      = FindObjectOfType <LightingCamera>();
        MapCamera           = FindObjectOfType <MiniMapCamera>();
        PlayableCharacters  = FindObjectOfType <PlayableCharacters>();
        GraveStoneManager   = FindObjectOfType <GraveStoneManager>();

        NullCheck(MapLayer);
        NullCheck(PlayerLayer);
        NullCheck(PlayerDamageLayer);
        NullCheck(PlayerInteractionLayer);
        NullCheck(EnemyLayer);
        NullCheck(EnemyDamageLayer);
        NullCheck(DeadEnemyLayer);

        Instance = this;
    }
예제 #5
0
 private void Awake()
 {
     lightingCam_         = GetComponent <Camera>();
     lightingImageEffect_ = ParentCamera.GetComponent <LightingImageEffect>();
 }