コード例 #1
0
    // Start is called before the first frame update
    void Start()
    {
        healthBar = Instantiate(HealthBarPrefab).GetComponent <HealthBarBehaviour>();
        Vector3 healthbarPosition = transform.position;

        healthbarPosition.y          = 10.5f;
        healthBar.transform.position = healthbarPosition;
        healthPoints = MaxHealth * 0.5f;
        healthBar.AngleToCamera();
        UpdateHealthBar();
        Barricade.material.mainTextureScale = new Vector2(1, 1);

        SecToNextAttack = SecBetweenAttacks;

        animator = GetComponent <Animator>();
    }