Beispiel #1
0
 void Awake()                                                                                                                        // --> Awake
 {
     Physics.IgnoreLayerCollision(8, 9, true);                                                                                       // Ignore collision between Layer 8 : "Board" and Layer 9 : "Paddle"
     Physics.IgnoreLayerCollision(10, 9, true);                                                                                      // Ignore collision between Layer 8 : "Board" and Layer 9 : "Paddle"
     Physics.IgnoreLayerCollision(11, 9, true);                                                                                      // Ignore collision between Layer 8 : "Board" and Layer 9 : "Paddle"
     Physics.IgnoreLayerCollision(12, 9, true);                                                                                      // Ignore collision between Layer 8 : "Board" and Layer 9 : "Paddle"
     Physics.IgnoreLayerCollision(13, 9, true);                                                                                      // Ignore collision between Layer 8 : "Board" and Layer 9 : "Paddle"
     Physics.IgnoreLayerCollision(0, 9, true);                                                                                       // Ignore collision between Layer 8 : "Default" and Layer 9 : "Paddle"
     source           = GetComponent <AudioSource>();                                                                                // Access GetComponent.<AudioSource>()
     obj_Game_Manager = GameObject.Find("Manager_Game");
     if (obj_Game_Manager != null)
     {
         gameManager_Input = obj_Game_Manager.GetComponent <Manager_Input_Setting>();                //  Access GetComponent..<Manager_Input_Setting>() from the gameObject Manager_Game on the hierarchy
     }
 }
Beispiel #2
0
    void Start()                                                                                        // --> Init
    {
        Camera_Board = GameObject.Find("Main Camera");                                                  // init Camera
        if (!b_Debug && Camera_Board && Camera_Board.GetComponent <Camera_Movement>())
        {
            camera_Movement = Camera_Board.GetComponent <Camera_Movement>();
        }

        //rb = GetComponent<Rigidbody>();
        sound_ = GetComponent <AudioSource>();                                                          // init audio

        obj_Game_Manager = GameObject.Find("Manager_Game");                                             // init game_Manager
        if (obj_Game_Manager != null)
        {
            gameManager_Input = obj_Game_Manager.GetComponent <Manager_Input_Setting>();

            name_F = gameManager_Input.F_Plunger();
        }
    }