コード例 #1
0
ファイル: SpiderController.cs プロジェクト: AnvaKondak/cDuty
    // Start is called before the first frame update
    void Start()
    {
        currentHealth = maxHealth;
        healthBar.SetMaxHealth(maxHealth);


        anim = GetComponent <Animator>();
    }
コード例 #2
0
    // Start is called before the first frame update
    void Start()
    {
        rigidbody2d   = transform.GetComponent <Rigidbody2D>();
        boxCollider2d = transform.GetComponent <BoxCollider2D>();
        timeManager   = GameObject.Find("TimeManager").GetComponent <TimeManager>();
        soundManager  = GameObject.Find("Sounds").GetComponent <SoundManager>();

        currentHealth = maxHealth;
        healthbar.SetMaxHealth(maxHealth);
    }
コード例 #3
0
    // Use this for initialization
    void Start()
    {
        rb          = this.GetComponent <Rigidbody>();
        enemyanim   = this.GetComponent <Animator>();
        audiosource = this.GetComponent <AudioSource>();

        currentHealth = maxHealth;
        healthBar.SetMaxHealth(maxHealth);
        Hptext.GetComponent <Text>().text = (maxHealth + "/" + currentHealth);

        target = GameObject.Find("Player"); //find Player name

        PlayerScript.Playerdeath = false;
    }
コード例 #4
0
    // Start is called before the first frame update
    void Start()
    {
        //check adn set ammo when start
        currentAmmo = maxAmmo;
        Ammotext.GetComponent <Text>().text = (maxAmmo + "/" + currentAmmo);

        audiosource = GetComponent <AudioSource>();
        //check, set and display health when start
        currentHealth = maxHealth;
        healthBar.SetMaxHealth(maxHealth);
        Hptext.GetComponent <Text>().text = (maxHealth + "/" + currentHealth);

        //set Text
        Scoretext.GetComponent <Text>().text = "Zombies Kill: " + Scorecount;

        //
        if (Score == null)
        {
            Score = this;
        }

        //Player death true or false
        Playerdeath = false;
    }
コード例 #5
0
 void Start()
 {
     currentHealth = MaxHealth;
     healthBar.SetMaxHealth(MaxHealth);
 }
コード例 #6
0
 private void Start()
 {
     healthbarscript.SetMaxHealth(houseHealth);
     // VV To be removed with new Game Manager VV
     GameWatcher.objectiveCount++;
 }
コード例 #7
0
 void Start()
 {
     currentHealth = maxHealth;
     Healthbar.SetMaxHealth(maxHealth);
 }