Example #1
0
    void handleSetupPlayer(MapObjectBehaviour obj, MapController map)
    {
        PlayerController player = obj.GetComponent <PlayerController>();

        if (player)
        {
            player.Setup(map);
        }
        else
        {
            Debug.LogErrorFormat("{0} does not contain a [PlayerController] instance");
        }
    }
Example #2
0
 bool isPlayer(MapObjectBehaviour obj)
 {
     return(obj.GetComponent <PlayerController>());
 }