コード例 #1
0
ファイル: ShootAI.cs プロジェクト: foopis23/IT-Service-2154
    /*
     * .##.....##.########.##.......########..########.########...######.
     * .##.....##.##.......##.......##.....##.##.......##.....##.##....##
     * .##.....##.##.......##.......##.....##.##.......##.....##.##......
     * .#########.######...##.......########..######...########...######.
     * .##.....##.##.......##.......##........##.......##...##.........##
     * .##.....##.##.......##.......##........##.......##....##..##....##
     * .##.....##.########.########.##........########.##.....##..######.
     */

    private void TakeDamage(float damage)
    {
        if (invisible)
        {
            return;
        }
        _health.ApplyDamage(damage);
        _damageDisplayManager.TakeDamage();
    }
コード例 #2
0
    private void TakeDamage(float damage)
    {
        if (!invisible)
        {
            invisible = false;
            _health.ApplyDamage(damage);
        }

        _simpleDamageDisplayManager.TakeDamage();
    }
コード例 #3
0
ファイル: SimpleBullet.cs プロジェクト: wallabyog/wakeuptest
 protected override void ApplyDamage(IHealth health)
 {
     health.ApplyDamage(_damage);
 }
コード例 #4
0
        // private void AddTargetToNotify(GameObject target){
        //     targetsToNotify.Add(target);
        // }

        // public void RemoveTargetToNotify(GameObject target){
        //     targetsToNotify.Remove(target);
        // }
        public void ApplyDamage(ICharacter instigator, float damage)
        {
            _health.ApplyDamage(GetBlockingDamage(instigator, damage));
        }
コード例 #5
0
 private void OnCollisionEnter2D(Collision2D other)
 {
     _health.ApplyDamage(10.0f);
 }
コード例 #6
0
 void IBullet.ApplyDamageOnHit(IHealth hitObject)
 {
     hitObject.ApplyDamage(damage);
 }