Example #1
0
 private void Awake()
 {
     //heartImagelist = new List<HeartImage>();
     instance = this;
     //healthSystem = new HeartHealthSystem(heartCount);
     //SetHeartHealthSystem(healthSystem);
 }
Example #2
0
 void Start()
 {
     healthVisual          = FindObjectOfType <HeartsHealthVisual>();
     slider                = timeSlider.GetComponent <Slider>();
     slider.maxValue       = bossTime;
     leftCorner            = spawnAttack.transform.Find("LeftCorner");
     rightCorner           = spawnAttack.transform.Find("RightCorner");
     activator.onTriger   += Activator_onTriger;
     healthVisual.onDeath += HealthVisual_onDeath;
 }
Example #3
0
 void Start()
 {
     _playerInput = GetComponent <PlayerInput>();
     _animator    = GetComponent <Animator>();
     _anim        = GetComponent <Animation>();
     hearts       = FindObjectOfType <HeartsHealthVisual>();
     potionSystem = FindObjectOfType <PotionSystemVisual>();
     sword.Setup(this);
     _anim.AddClip(sword.shortAttack, "shortAttack");
     _anim.AddClip(sword.longAttack, "longAttack");
 }
Example #4
0
 void Awake()
 {
     if (!testing)
     {
         GameObject player = Instantiate(playerPrefab, currentCheckPoint.position, currentCheckPoint.rotation);
         player.GetComponent <Player.PlayerCombat>().sword = weapons[0];
         gameCamera.cameraFollow.Setup(() => player.transform.position + gameCamera.offset);
     }
     else
     {
         GameObject player = FindObjectOfType <Player.PlayerCombat>().gameObject;
         gameCamera.cameraFollow.Setup(() => player.transform.position + gameCamera.offset);
     }
     healthVisual = FindObjectOfType <HeartsHealthVisual>();
     potionSystem = FindObjectOfType <PotionSystemVisual>();
     FindObjectOfType <Player.PlayerCombat>().sword = weapons[weaponIndex];
     healthVisual.onDeath += Game_OnDeath;
 }
 public HeartImage(HeartsHealthVisual heartsHealthVisual, Image heartImage, Animation animation)
 {
     this.heartsHealthVisual = heartsHealthVisual;
     this.heartImage         = heartImage;
     this.animation          = animation;
 }
 public HeartImage(HeartsHealthVisual heartsHealthVisual, Image heartImage)
 {
     this.heartsHealthVisual = heartsHealthVisual;
     this.heartImage         = heartImage;
 }
 public HeartImage(HeartsHealthVisual heartsHealthVisual, Image heartImage)
 {
     this.heartsHealthVisual = heartsHealthVisual;
     this.heartImage         = heartImage;
     currentValue            = 1;
 }
Example #8
0
 public HeartImage(HeartsHealthVisual heartVisual, Image image)
 {
     this.healthVisual = heartVisual;
     heartImage        = image;
 }