MasterDriver.Awake C# (CSharp) Method

Awake() private method

private Awake ( ) : void
return void
    void Awake()
    {
        //Setup singleton here.
        if (master == null)
        {
            master = this;
            DontDestroyOnLoad(this);
            DontDestroyOnLoad(this.gameObject);
        }
        else if (master != this)
        {
            Destroy(this);
        }

        //Raycasts ignore the ignoreRaycast, select character, and non-draggable area layers.
        regularCharacterMask = ~0 & ~((1 << 2) | (1 << 10) | (1 << 11) | (1 << 12));

        //Raycasts ignore the ignoreRaycast, selectCharacters, and other characters.
        draggedCharacterMask = ~0 & ~((1 << 2) | (1 << 10) | (1 << 8));

        //Ignore collision between characters and the selected characters.
        Physics2D.IgnoreLayerCollision(8, 10, true);

        Cursor.SetCursor(cursorTexture, new Vector2(13, 13), CursorMode.Auto);

        MusicLooper.loadAudioClips();
    }
MasterDriver