示例#1
0
    void Start()
    {
        encounterManger = GameObject.FindGameObjectWithTag("EncounterManager").GetComponent <EncounterManger>();
        attackButton.onClick.AddListener(OnAttackButton);
        playerNameText.text = encounterManger.player.name;
        enemyNameText.text  = encounterManger.enemy.name;

        UpdateLocalHealthValuesToManager();

        RefreshHealthSliders();
    }
示例#2
0
    private void Awake()
    {
        if (encounterManger != null)
        {
            GameObject.Destroy(this.gameObject);
        }
        else
        {
            encounterManger = this;
        }

        DontDestroyOnLoad(this);
    }