Example #1
0
    void Awake()
    {
        capsuleCollider = GetComponent <CapsuleCollider> ();

        currentHealth = startingHealth;
        healthBar     = GetComponentInChildren <EnemyHealthBarController>();
    }
Example #2
0
 // Start is called before the first frame update
 void Start()
 {
     AdjustStartPosition();
     healthBarController = GetComponent <EnemyHealthBarController>();
     playerController    = GameObject.FindObjectOfType <PlayerController>();
     health = maxHealth;
 }
Example #3
0
 protected virtual void Awake()
 {
     Stats               = new Attributes();
     PickupItemPrefab    = Resources.Load <PickupItem>("Prefabs/Interactable/Pickup Item");
     Player              = GameObject.FindGameObjectWithTag("Player").GetComponent <Player>();
     EnemyMovement       = GetComponentInChildren <EnemyMovement>();
     HealthBar           = EnemyHealthBarController.CreateHealthBar(transform);
     Animator            = GetComponent <Animator>();
     Stats.CurrentHealth = Stats.MaxHealth;
     Stats.CurrentMana   = Stats.MaxMana;
     Rigidbody2D         = GetComponentInParent <Rigidbody2D>();
 }
    void Awake()
    {
        InIntro = true;
        if (Instance != null && Instance != this)
        {
            Destroy(gameObject);
        }
        else
        {
            Instance = this;
        }

        canvas         = GameObject.FindGameObjectWithTag("Canvas");
        characterPanel = canvas.transform.Find("Panel_Character").gameObject;
        //StartCoroutine(ScreenFader.FadeToClear());
        player = GameObject.FindGameObjectWithTag("Player").GetComponent <Player>();
        Camera.main.transform.position = player.transform.position;
        GameVersion = "Development V10.0";
        FloatingTextController.Initialize();
        EnemyHealthBarController.Initialize();
    }