// Use this for initialization
 void Start()
 {
     cubeplatform_scriptereference = GameObject.FindGameObjectWithTag("PuzzleMachine").GetComponent <PlatformPuzzleTypeOne>();
     if (PlayerPrefs.GetInt("Retries") == 10)
     {
         // StartCoroutine(FadeInButton());
     }
 }
예제 #2
0
 // Use this for initialization
 void Start()
 {
     PickupCubeButton                     = GameObject.FindGameObjectWithTag("PickupButtonTag");
     cube                                 = GameObject.FindGameObjectWithTag("PuzzlePiece"); // find the puzzlepiece and set it to Cube so I can reference it later.
     projector_reference                  = cube.GetComponentInChildren <Projector>();
     cubeParticleRef                      = cube.GetComponentInChildren <ParticleSystem>();  // find the particle system component of the cube so I can store reference.
     playSound                            = true;
     cube_rigidbody_reference             = cube.GetComponent <Rigidbody>();
     cube_collider_reference              = cube.GetComponent <Collider>();
     Platform_reference                   = GameObject.FindGameObjectWithTag("PuzzleMachine");
     projector_reference.orthographicSize = 0;
     platform_script_reference            = Platform_reference.GetComponent <PlatformPuzzleTypeOne>();
 }
예제 #3
0
    public void InitiatePlayerProperties()
    {
        platform_puzzle_gameobject = GameObject.FindGameObjectWithTag("PuzzleMachine");
        EndingPuzzle_Reference     = platform_puzzle_gameobject.GetComponent <PlatformPuzzleTypeOne>();


        RestartLevelScript_Reference = new RestartLevelIfSomethingFalls();
        Player_health = GameObject.FindGameObjectWithTag("PlayerHealth").GetComponent <Slider>();
        CharAnimator  = GetComponent <Animator>();
        forward       = Camera.main.transform.forward;
        forward.y     = 0;
        forward       = Vector3.Normalize(forward);
        right         = Quaternion.Euler(new Vector3(0, 90, 0)) * forward;
        InvokeRepeating("CheckIfPlayerIsDead", .25f, .25f);
        isPlayerDead           = false;
        isPlayer_StandingStill = true;
    }//Load components and other things neccessery at the start of the level.