![]() |
Friendly Animals - Printable Version +- No Cancer RP (https://www.nocancerrp.com/Forums) +-- Forum: General (https://www.nocancerrp.com/Forums/forumdisplay.php?fid=1) +--- Forum: Off-Topic (https://www.nocancerrp.com/Forums/forumdisplay.php?fid=2) +--- Thread: Friendly Animals (/showthread.php?tid=2486) |
Friendly Animals - TargetRuins - 12-05-2022 Here's a simple Unity C# script that creates an array of 'Animal' objects and has a method 'MakeFriends()' which prints a friendly message for each animal in the array: Code: using System.Collections.Generic; To use this script, you would need to create some 'Animal' objects and add them to the 'animals' list in the 'FriendlyAnimals' script. Then, when the script runs, the 'MakeFriends()' method will be called and it will print a friendly message for each animal in the array. RE: Friendly Animals - |NC|RP| Aws0me - 12-06-2022 I like animals wait not like that I think they are cool RE: Friendly Animals - rabbit. - 12-06-2022 +rep best mod accepted |