MainScript.GetListOfAllMonkeys C# (CSharp) Method

GetListOfAllMonkeys() public method

Returns the list of all monkeys currently in the game
public GetListOfAllMonkeys ( ) : List
return List
    public List<Transform> GetListOfAllMonkeys()
    {
        return alliedMonkeys;
    }

Usage Example

    // Use this for initialization
    void Start()
    {
        // Calculate the message position on the screen
        fEndMessagePosY = Screen.height - (fEndMessageHeight * 1.5f);
        rectEndMessage = new Rect(Screen.width * 0.5f - fEndMessageWidth * 0.5f,
                fEndMessagePosY, fEndMessageWidth, fEndMessageHeight);

        // Cache the main script
        scriptMainScript = GameObject.Find("/Codigo").GetComponent<MainScript>();

        // Minimap script
        GameObject goMinimapCam = GameObject.FindWithTag("MinimapCam");
        scriptMinimap = goMinimapCam.GetComponent<Minimap>();

        // Hud object
        tHud = GameObject.Find("/HUD").transform;

        goMainCamera = GameObject.FindWithTag("MainCamera");

        // All the monkeys in the game
        lAllMonkeys = scriptMainScript.GetListOfAllMonkeys();

        SetupCameras();
        DeathSequence();
    }