Beispiel #1
0
    public void Start()
    {
        if (TopDownUIManager.instance != null)
        {
            characterButtonsUi = TopDownUIManager.instance.characterPortraits;
        }

        characterCamera = GameObject.FindObjectOfType <TopDownCameraBasic>();

        if (defaultCharacter != null)
        {
            AddCharacterToParty(defaultCharacter);
        }

        if (defaultCharacter == null && activeCharacters.Count < 1)
        {
            if (GameObject.FindGameObjectWithTag("Player"))
            {
                AddCharacterToParty(GameObject.FindGameObjectWithTag("Player").gameObject);
            }
            else
            {
                Debug.LogError("No character with TopDownControllerMain.cs found in scene!");
                return;
            }
        }
    }
Beispiel #2
0
    public void OnEnable()
    {
        td_target = (TopDownCameraBasic)target;

        if (TopDownIcon == null)
        {
            TopDownIcon = Resources.Load("TopDownIcon") as Texture;
        }
    }
    private void Start()
    {
        if (characterInSlot != null)
        {
            SetCharacterUI();
            occupied = true;
        }

        characterManager = TopDownCharacterManager.instance;
        uiManager        = TopDownUIManager.instance;
        uiInventory      = TopDownUIInventory.instance;

        cameraBasic = GameObject.FindObjectOfType <TopDownCameraBasic>();
    }
Beispiel #4
0
 public void Start()
 {
     cameraBasic = TopDownCameraBasic.instance;
 }
 public void Awake()
 {
     instance = this;
 }