コード例 #1
0
        /// <summary>
        /// ///////////////////////////////////////////////////////////////////////////////////
        /// </summary>
        /// <param name="dmg"></param>
        public void BossAttacksEveryone(float dmg)
        {
            var evnt = BossAttacksEveryoneEvent.Create(Bolt.GlobalTargets.Everyone);

            evnt.Damage = dmg;
            evnt.Send();
        }
コード例 #2
0
 /*Everyone recieves this during combat*/
 public override void OnEvent(BossAttacksEveryoneEvent evnt)
 {
     try
     {
         GameObject bossImage = GameObject.FindGameObjectWithTag("Enemy");
         bossImage.GetComponent <SpriteRenderer>().sprite = bossAttackSprite;
         StartCoroutine(WaitForAttack(bossImage));
     }
     catch
     {
     }
     playerSpellcaster = playerEntity.GetComponent <Player>().spellcaster;
     playerSpellcaster.TakeDamage((int)evnt.Damage);
     //TODO: MAYBE DISPLAY FEEDBACK?
 }