Ejemplo n.º 1
0
    public void LoadBot(BotController bot)
    {
        this.bot = bot;

        healthBar.maxValue = bot.maxHealth;
        healthBar.value    = bot.maxHealth;

        previewBot = bot.BuildPreview();
        previewBot.transform.parent        = previewPanel.transform;
        previewBot.transform.localPosition = Vector3.zero;
        previewBot.transform.localRotation = bot.gameObject.transform.rotation;
        previewBot.transform.localScale    = new Vector3(0.25f, 0.25f, 0.25f);
    }