Ejemplo n.º 1
0
    // Damage enemies that enter this hitbox. May want to change to OnTriggerStay if
    // we want hitboxes with continuous damage.
    protected virtual void OnTriggerEnter(Collider other)
    {
        CombatActor otherActor = other.gameObject.GetComponent <CombatActor>();

        if (otherActor != null && (otherActor.faction != faction || friendlyFire))
        {
            otherActor.Health -= Mathf.FloorToInt(damage);
            // for debugging
            print(otherActor.Health);
        }

        /**
         * // Commenting out this code b/c it means hitboxes colliding also damages user
         *
         * else
         * {
         *  CombatActor dmg = other.gameObject.GetComponentInParent<CombatActor>();
         *  if (dmg != null)
         *  {
         *      dmg.health -= Mathf.FloorToInt(damage);
         *      print(dmg.health);
         *  }
         * }
         **/
    }
Ejemplo n.º 2
0
		// Token: 0x06003895 RID: 14485 RVA: 0x00100E68 File Offset: 0x000FF068
		public void AddDelayHit(int frame, Vector2i pos, CombatActor target)
		{
			if (!BJLuaObjHelper.IsSkipLuaHotfix && this.TryInitHotFix("") && this.m_AddDelayHitInt32Vector2iCombatActor_hotfix != null)
			{
				this.m_AddDelayHitInt32Vector2iCombatActor_hotfix.call(new object[]
				{
					this,
					frame,
					pos,
					target
				});
				return;
			}
			BJLuaObjHelper.IsSkipLuaHotfix = false;
			if (this.m_hitCount >= this.m_skillInfo.HitCountMax)
			{
				return;
			}
			int index = 0;
			for (int i = this.m_delayHits.Count - 1; i >= 0; i--)
			{
				if (this.m_delayHits[i].m_frame <= frame)
				{
					index = i + 1;
					break;
				}
			}
			DelayHit item = default(DelayHit);
			item.m_frame = frame;
			item.m_position = pos;
			item.m_targetActor = target;
			this.m_delayHits.Insert(index, item);
		}
Ejemplo n.º 3
0
 /// <summary>
 /// Creates a new traveling state with the given actor and intervals.
 /// </summary>
 /// <param name="actor">The actor to travel.</param>
 /// <param name="repathInterval">The period of time between repathing.</param>
 /// <param name="evaluateInterval">The period of time between state evaluation.</param>
 public TravelingState(CombatActor actor,
                       float repathInterval, float evaluateInterval)
     : base(actor, evaluateInterval)
 {
     this.actor     = actor;
     RepathInterval = repathInterval;
 }
Ejemplo n.º 4
0
 public CombatActor(INameable name, IStats stats, IDamageable damageable, IDamageDealer dealer)
 {
     Name         = name;
     Target       = null;
     Stats        = stats;
     Damageable   = damageable;
     DamageDealer = dealer;
 }
Ejemplo n.º 5
0
    public override void ApplyToActor(CombatActor aTargetActor)
    {
        int defense      = aTargetActor.GetAttributeValue(AttributeType.Defense);
        int finalDamages = (int)Mathf.Ceil(myDamageAmount - defense / 2);

        // TODO: damage type
        aTargetActor.TakeDamage(mySourceActor, finalDamages, myDamageType);
    }
Ejemplo n.º 6
0
        // Token: 0x0600378A RID: 14218 RVA: 0x000F9D90 File Offset: 0x000F7F90
        private void SetupTeam(int teamNumber, BattleActor battleActor, ConfigDataSkillInfo heroSkillInfo)
        {
            if (!BJLuaObjHelper.IsSkipLuaHotfix && this.TryInitHotFix("") && this.m_SetupTeamInt32BattleActorConfigDataSkillInfo_hotfix != null)
            {
                this.m_SetupTeamInt32BattleActorConfigDataSkillInfo_hotfix.call(new object[]
                {
                    this,
                    teamNumber,
                    battleActor,
                    heroSkillInfo
                });
                return;
            }
            BJLuaObjHelper.IsSkipLuaHotfix = false;
            if (battleActor == null)
            {
                return;
            }
            CombatTeam combatTeam = this.m_teams[teamNumber];

            combatTeam.Initialize(this, teamNumber, battleActor, heroSkillInfo);
            int num  = this.ConfigDataLoader.Const_CombatHeroDistance / -2;
            int num2 = -20;
            int num3 = 1;

            if (this.GetCombatGridDistance() > 1)
            {
                num -= this.ConfigDataLoader.Const_CombatSplitScreenDistance / 2;
            }
            if (teamNumber != 0)
            {
                num  = -num;
                num3 = -1;
            }
            if (battleActor.HeroInfo != null)
            {
                CombatActor combatActor = combatTeam.CreateActor(true);
                combatActor.SetPosition(num, num2);
                combatActor.SetDirection(num3);
                combatActor.SetFormationLine(9);
            }
            if (battleActor.SoldierInfo != null)
            {
                int soldierCount = battleActor.GetSoldierCount();
                for (int i = 0; i < soldierCount; i++)
                {
                    CombatActor combatActor2      = combatTeam.CreateActor(false);
                    Position2i  formationPosition = combatTeam.GetFormationPosition(i);
                    combatActor2.SetPosition(num + formationPosition.x * num3, num2 + formationPosition.y);
                    combatActor2.SetDirection(num3);
                    combatActor2.SetFormationLine(combatTeam.GetFormationLine(i));
                    if (i == soldierCount - 1)
                    {
                        combatActor2.SetHealthPoint(battleActor.SoldierTotalHealthPoint - combatActor2.HealthPointMax * (soldierCount - 1));
                    }
                }
            }
        }
Ejemplo n.º 7
0
    public override List <CombatEffect> GenerateCombatEffects(CombatActor aSourceCombatActor, Vector2Int aTargetPosition)
    {
        int attack = aSourceCombatActor.GetAttributeValue(AttributeType.Attack);
        DamageCombatEffect damageEffect = new DamageCombatEffect(attack, DamageType.PHYSICAL);

        damageEffect.myAffectedCells = GetAffectedCellsPattern();

        return(new List <CombatEffect>()
        {
            damageEffect
        });
    }
Ejemplo n.º 8
0
        // Token: 0x060038A6 RID: 14502 RVA: 0x00101EBC File Offset: 0x001000BC
        private void AddSkillDelayHits(CombatSkillState ss, Fix64 x0, Fix64 x1)
        {
            if (!BJLuaObjHelper.IsSkipLuaHotfix && this.TryInitHotFix("") && this.m_AddSkillDelayHitsCombatSkillStateFix64Fix64_hotfix != null)
            {
                this.m_AddSkillDelayHitsCombatSkillStateFix64Fix64_hotfix.call(new object[]
                {
                    this,
                    ss,
                    x0,
                    x1
                });
                return;
            }
            BJLuaObjHelper.IsSkipLuaHotfix = false;
            int num  = 0;
            int num2 = 0;
            int num3 = this.GetDelayHitFrameMax() - this.m_frameCount;

            if (num3 >= 0 && ss.m_skillInfo.Time_MultiHit.Count > 0)
            {
                num  = Combat.FrameToMillisecond(num3) + ss.m_skillInfo.Time_MultiHit[0];
                num2 = 1;
            }
            while (ss.m_preAttackHitCount < ss.m_skillInfo.HitCountMax)
            {
                CombatActor combatActor = this.SearchHitTarget(x0, x1, this.m_hitId);
                if (combatActor != null)
                {
                    bool isCritical = ss.IsCritical(combatActor.IsHero());
                    do
                    {
                        this.AddDelayHit(combatActor, num);
                        this.m_sourceActor.PreAttack(combatActor, ss.m_skillInfo, isCritical);
                        if (ss.m_skillInfo.Time_MultiHit.Count > 0)
                        {
                            num += ss.m_skillInfo.Time_MultiHit[num2 % ss.m_skillInfo.Time_MultiHit.Count];
                            num2++;
                        }
                        ss.m_preAttackHitCount++;
                        if (combatActor.GetPreAttackHealthPoint() <= 0 && !combatActor.IsHero())
                        {
                            break;
                        }
                    }while (ss.m_preAttackHitCount < ss.m_skillInfo.HitCountMax);
IL_190:
                    combatActor.AddBeHitId(this.m_hitId);
                    continue;
                    goto IL_190;
                }
                break;
            }
        }
Ejemplo n.º 9
0
        // Token: 0x060038A3 RID: 14499 RVA: 0x001019E0 File Offset: 0x000FFBE0
        private static int ComputeTargetScore(Fix64 x, CombatActor target)
        {
            int num = 0;

            if (target.GetPreAttackHealthPoint() <= 0)
            {
                num = 1000000;
            }
            num += target.FormationLine * 100000;
            int num2 = (int)((long)(x - target.Position.x));

            return(num + num2 * num2 / 100);
        }
    private void OnTriggerEnter(Collider collider)
    {
        CombatActor actor = collider.gameObject.GetComponent <CombatActor>();

        if (actor)
        {
            // Damage the actor
            actor.TakeDamage(Damage);

            // Destroy this object on collision
            Destroy(gameObject);
        }
    }
Ejemplo n.º 11
0
    public override List <CombatEffect> GenerateCombatEffects(CombatActor aSourceCombatActor, Vector2Int aTargetPosition)
    {
        int   magic         = aSourceCombatActor.GetAttributeValue(AttributeType.MagicPower);
        float magicModifier = 1.0f + magic / 10.0f;
        int   damages       = (int)Mathf.Floor(10 * magicModifier);
        DamageCombatEffect    damageEffect = new DamageCombatEffect(damages, DamageType.AIR);
        PushActorCombatEffect pushEffect   = new PushActorCombatEffect(new Vector2Int(2, 0));

        return(new List <CombatEffect>()
        {
            damageEffect, pushEffect
        });
    }
Ejemplo n.º 12
0
 private void Awake()
 {
     // Convert the inspector materials into dictionary form.
     materials = new Dictionary <CombatActor.State, Material>();
     foreach (StateMaterialEntry entry in stateMaterials)
     {
         materials.Add(entry.state, entry.material);
     }
     // Get the combat actor instance.
     instance = combatActor.Unwrap();
     // Subscribe to the state changed event and set initial visual state.
     instance.StateChanged += OnStateChanged;
     OnStateChanged(instance, instance.CurrentState);
 }
Ejemplo n.º 13
0
    // Reinitialize variables, should be used if repurposing a hitbox.
    public virtual void reinitialize(GameObject u, float dam, float lifetime, bool hurtSelf, bool reuse)
    {
        user            = u;
        damage          = dam;
        lifetimeSeconds = lifetime;
        friendlyFire    = hurtSelf;
        reusable        = reuse;
        CombatActor userActor = u.GetComponent <CombatActor>();

        faction = userActor != null ? userActor.faction: Faction.None;

        convertLifetime();
        reset();
    }
Ejemplo n.º 14
0
 // Token: 0x060038A5 RID: 14501 RVA: 0x00101C34 File Offset: 0x000FFE34
 public override void Tick()
 {
     if (!BJLuaObjHelper.IsSkipLuaHotfix && this.TryInitHotFix("") && this.m_Tick_hotfix != null)
     {
         this.m_Tick_hotfix.call(new object[]
         {
             this
         });
         return;
     }
     BJLuaObjHelper.IsSkipLuaHotfix = false;
     this.m_life++;
     this.m_frameCount++;
     if (this.m_life <= this.m_lifeMax)
     {
         if (this.m_configDataFlyObjectInfo.TrackType == TrackType.TrackType_Parabolic)
         {
             CombatActor targetActor = this.m_targetActor;
             Fix64       value       = MathUtility.Lerp(this.m_startPosition.x, this.m_endPosition.x, (Fix64)((long)this.m_life) / (Fix64)((long)this.m_lifeMax));
             int         num         = this.m_configDataFlyObjectInfo.CollisionRadius + targetActor.Radius;
             if (((this.m_endPosition.x >= this.m_startPosition.x && (int)((long)value) >= (int)((long)targetActor.Position.x) - num) || (this.m_endPosition.x < this.m_startPosition.x && (int)((long)value) <= (int)((long)targetActor.Position.x) + num)) && targetActor.CanBeTarget())
             {
                 this.Attack(this.m_targetActor);
                 this.m_targetActor.AddBeHitId(this.m_hitId);
                 this.m_sourceSkillState.m_hitCount++;
                 base.DeleteMe();
             }
         }
         else
         {
             Fix64 x  = MathUtility.Lerp(this.m_startPosition.x, this.m_endPosition.x, (Fix64)((long)(this.m_life - 1)) / (Fix64)((long)this.m_lifeMax));
             Fix64 x2 = MathUtility.Lerp(this.m_startPosition.x, this.m_endPosition.x, (Fix64)((long)this.m_life) / (Fix64)((long)this.m_lifeMax));
             this.AddSkillDelayHits(this.m_sourceSkillState, x, x2);
             this.TickDelayHits();
         }
     }
     else if (this.HasDelayHit())
     {
         this.TickDelayHits();
         if (this.m_fx != null)
         {
             this.m_fx.FxStop(true);
             this.m_fx = null;
         }
     }
     else
     {
         base.DeleteMe();
     }
 }
Ejemplo n.º 15
0
 public CombatActorViewModel(CombatActorPairStats pairStats, string mainActorName)
 {
     if (pairStats == null)
     {
         throw new ArgumentNullException("pairStats");
     }
     if (mainActorName == null)
     {
         throw new ArgumentNullException("mainActorName");
     }
     PairStats     = pairStats;
     AttackerActor = pairStats.GetActorByName(mainActorName);
     DefenderActor = pairStats.ActorOne == AttackerActor ? pairStats.ActorTwo : pairStats.ActorOne;
 }
Ejemplo n.º 16
0
        // Token: 0x060038A4 RID: 14500 RVA: 0x00101A38 File Offset: 0x000FFC38
        private CombatActor SearchHitTarget(Fix64 x0, Fix64 x1, ushort hitId)
        {
            if (!BJLuaObjHelper.IsSkipLuaHotfix && this.TryInitHotFix("") && this.m_SearchHitTargetFix64Fix64UInt16_hotfix != null)
            {
                return((CombatActor)this.m_SearchHitTargetFix64Fix64UInt16_hotfix.call(new object[]
                {
                    this,
                    x0,
                    x1,
                    hitId
                }));
            }
            BJLuaObjHelper.IsSkipLuaHotfix = false;
            CombatTeam  team   = this.Combat.GetTeam(this.m_targetTeamNumber);
            int         num    = int.MaxValue;
            CombatActor result = null;
            int         num2   = (int)((long)(x0 + x1)) / 2;
            int         num3   = Math.Abs((int)((long)(x0 - x1)) / 2) + this.m_configDataFlyObjectInfo.CollisionRadius;

            if (!this.m_team.IsAttackHeroOnly())
            {
                foreach (CombatActor combatActor in team.GetActors())
                {
                    if (combatActor.CanBeTarget())
                    {
                        if (Math.Abs((int)((long)combatActor.Position.x) - num2) <= num3 + combatActor.Radius)
                        {
                            if (!combatActor.HasBeHitId(hitId))
                            {
                                int num4 = CombatFlyObject.ComputeTargetScore(x1, combatActor);
                                if (num4 < num)
                                {
                                    num    = num4;
                                    result = combatActor;
                                }
                            }
                        }
                    }
                }
                return(result);
            }
            CombatActor hero = team.GetHero();

            if (hero != null && hero.CanBeTarget() && Math.Abs((int)((long)hero.Position.x) - num2) <= num3 + hero.Radius)
            {
                return(hero);
            }
            return(null);
        }
Ejemplo n.º 17
0
    protected override void attackAction()
    {
        for (int i = 0; i < hitboxObjs.Length; i++)
        {
            hitboxObjs[i].SetActive(true);
        }
        CombatActor selfDmg = GetComponentInParent <CombatActor>();

        if (selfDmg != null)
        {
            selfDmg.Health -= Mathf.FloorToInt(selfDamage);
            // for debugging
            print(selfDmg.Health);
        }
    }
Ejemplo n.º 18
0
    public override List <CombatEffect> GenerateCombatEffects(CombatActor aSourceCombatActor, Vector2Int aTargetPosition)
    {
        int   magic         = aSourceCombatActor.GetAttributeValue(AttributeType.MagicPower);
        float magicModifier = 1.0f + magic / 10.0f;
        int   damages       = (int)Mathf.Floor(10 * magicModifier);

        DamageCombatEffect damageCombatEffect = new DamageCombatEffect(damages, DamageType.FIRE);
        BuffCombatEffect   burningEffect      = new BuffCombatEffect(); // TODO: burning as buff

        return(new List <CombatEffect>()
        {
            damageCombatEffect,
            burningEffect
        });
    }
Ejemplo n.º 19
0
 // Token: 0x06003790 RID: 14224 RVA: 0x000FA21C File Offset: 0x000F841C
 public void OnActorCastSkill(CombatActor a, ConfigDataSkillInfo skillInfo)
 {
     if (!BJLuaObjHelper.IsSkipLuaHotfix && this.TryInitHotFix("") && this.m_OnActorCastSkillCombatActorConfigDataSkillInfo_hotfix != null)
     {
         this.m_OnActorCastSkillCombatActorConfigDataSkillInfo_hotfix.call(new object[]
         {
             this,
             a,
             skillInfo
         });
         return;
     }
     BJLuaObjHelper.IsSkipLuaHotfix = false;
     if (a == null || skillInfo == null)
     {
         return;
     }
     if (skillInfo.CutsceneType != 0)
     {
         ConfigDataCutsceneInfo configDataCutsceneInfo = null;
         if (skillInfo.CutsceneType == 1)
         {
             ConfigDataHeroInfo heroInfo = a.Team.HeroInfo;
             if (heroInfo != null)
             {
                 ConfigDataCharImageInfo charImageInfo = heroInfo.GetCharImageInfo(a.Team.HeroStar);
                 if (charImageInfo != null)
                 {
                     configDataCutsceneInfo = charImageInfo.m_skillCutsceneInfo;
                 }
             }
         }
         this.Pause(true);
         this.m_teams[a.TeamNumber].SetGraphicSkillFade(true);
         if (configDataCutsceneInfo != null)
         {
             this.m_cutscenePauseCountdown = Combat.MillisecondToFrame1(configDataCutsceneInfo.Time);
         }
         else
         {
             this.m_cutscenePauseCountdown = Combat.MillisecondToFrame1(this.ConfigDataLoader.Const_SkillPauseTime);
         }
         this.m_battle.Listener.OnStartSkillCutscene(skillInfo, configDataCutsceneInfo, a.TeamNumber);
     }
 }
Ejemplo n.º 20
0
        string BuildSpellAttacks(CombatActor actor)
        {
            string result = string.Empty;

            if (actor.AffectingHits > 0)
            {
                result += "Affecting: " + actor.AffectingHits + Environment.NewLine;
            }
            if (actor.FreezingHits > 0)
            {
                result += "Freezing: " + actor.FreezingHits + Environment.NewLine;
            }
            if (actor.FlamingHits > 0)
            {
                result += "Burning: " + actor.FlamingHits + Environment.NewLine;
            }
            return(result);
        }
Ejemplo n.º 21
0
 // Token: 0x06003792 RID: 14226 RVA: 0x000FA42C File Offset: 0x000F862C
 public void OnActorDie(CombatActor a)
 {
     if (!BJLuaObjHelper.IsSkipLuaHotfix && this.TryInitHotFix("") && this.m_OnActorDieCombatActor_hotfix != null)
     {
         this.m_OnActorDieCombatActor_hotfix.call(new object[]
         {
             this,
             a
         });
         return;
     }
     BJLuaObjHelper.IsSkipLuaHotfix = false;
     if (!this.IsPlay())
     {
         return;
     }
     this.m_battle.Listener.OnCombatActorDie(a);
 }
Ejemplo n.º 22
0
        // Token: 0x060038A7 RID: 14503 RVA: 0x00102088 File Offset: 0x00100288
        private bool Attack(CombatActor target)
        {
            if (!BJLuaObjHelper.IsSkipLuaHotfix && this.TryInitHotFix("") && this.m_AttackCombatActor_hotfix != null)
            {
                return(Convert.ToBoolean(this.m_AttackCombatActor_hotfix.call(new object[]
                {
                    this,
                    target
                })));
            }
            BJLuaObjHelper.IsSkipLuaHotfix = false;
            if (target == null)
            {
                return(false);
            }
            bool isCritical = this.m_sourceSkillState.IsCritical(target.IsHero());

            target.AttackBy(this.m_sourceActor, this.m_sourceSkillState.m_skillInfo, isCritical);
            return(true);
        }
Ejemplo n.º 23
0
        private void TravelFight(Location location)
        {
            var opponent = World.Creatures
                           .OrderBy(c => Math.Abs(c.Stats.Level - Player.Stats.Level))
                           .Take(3)
                           .ToList()
                           .Random()
                           .Clone();

            CombatActor combatOpponent = new CombatActor(opponent, opponent.Stats, opponent, opponent);
            Combat      combat         = new Combat(Player, new[] { combatOpponent });

            SetView(new ViewCombat(this, Renderer, combat, () =>
            {
                TravelTo(location, false);
                if (combat.EnemiesDead)
                {
                    RewardPlayerForCombat(combat);
                }
            }));
        }
Ejemplo n.º 24
0
 // Token: 0x06003791 RID: 14225 RVA: 0x000FA358 File Offset: 0x000F8558
 public void OnActorCastPassiveSkill(CombatActor a, BuffState sourceBuffState)
 {
     if (!BJLuaObjHelper.IsSkipLuaHotfix && this.TryInitHotFix("") && this.m_OnActorCastPassiveSkillCombatActorBuffState_hotfix != null)
     {
         this.m_OnActorCastPassiveSkillCombatActorBuffState_hotfix.call(new object[]
         {
             this,
             a,
             sourceBuffState
         });
         return;
     }
     BJLuaObjHelper.IsSkipLuaHotfix = false;
     if (a == null || sourceBuffState == null)
     {
         return;
     }
     this.Pause(true);
     this.m_teams[a.TeamNumber].SetGraphicSkillFade(true);
     this.m_cutscenePauseCountdown = Combat.MillisecondToFrame1(this.ConfigDataLoader.Const_SkillPauseTime);
     this.m_battle.Listener.OnStartPassiveSkillCutscene(sourceBuffState, a.TeamNumber);
 }
Ejemplo n.º 25
0
        // Token: 0x060038A8 RID: 14504 RVA: 0x00102138 File Offset: 0x00100338
        private void AddDelayHit(CombatActor target, int delay)
        {
            if (!BJLuaObjHelper.IsSkipLuaHotfix && this.TryInitHotFix("") && this.m_AddDelayHitCombatActorInt32_hotfix != null)
            {
                this.m_AddDelayHitCombatActorInt32_hotfix.call(new object[]
                {
                    this,
                    target,
                    delay
                });
                return;
            }
            BJLuaObjHelper.IsSkipLuaHotfix = false;
            if (target == null)
            {
                return;
            }
            if (this.m_delayHits == null)
            {
                this.m_delayHits = new List <DelayHit>();
            }
            int num   = this.m_frameCount + Combat.MillisecondToFrame(delay);
            int index = 0;

            for (int i = this.m_delayHits.Count - 1; i >= 0; i--)
            {
                if (this.m_delayHits[i].m_frame <= num)
                {
                    index = i + 1;
                    break;
                }
            }
            DelayHit item = default(DelayHit);

            item.m_frame       = num;
            item.m_targetActor = target;
            this.m_delayHits.Insert(index, item);
            this.m_sourceActor.SetCanStopFrame(delay + this.Combat.ConfigDataLoader.Const_DamagePostDelay);
        }
Ejemplo n.º 26
0
    // Use this for initialization
    void Start()
    {
        CombatActor mainChar = new CombatActor();

        mainChar.myName     = "MainChar";
        mainChar.myPosition = new Vector2Int(1, 1);
        mainChar.SetAttributeValue(AttributeType.MaxHealth, 100);
        mainChar.SetAttributeValue(AttributeType.CurrentHealth, 100);

        CombatActor enemy1Char = new CombatActor();

        enemy1Char.myName     = "Enemy1";
        enemy1Char.myPosition = new Vector2Int(7, 1);
        enemy1Char.SetAttributeValue(AttributeType.MaxHealth, 100);
        enemy1Char.SetAttributeValue(AttributeType.CurrentHealth, 100);

        CombatActor enemy2Char = new CombatActor();

        enemy2Char.myName     = "Enemy2";
        enemy2Char.myPosition = new Vector2Int(6, 2);
        enemy2Char.SetAttributeValue(AttributeType.MaxHealth, 100);
        enemy2Char.SetAttributeValue(AttributeType.CurrentHealth, 100);
    }
Ejemplo n.º 27
0
 public void TakeDamage(CombatActor aSource, int aDamageAmount, DamageType aDamageType)
 {
     GetAttributeState(AttributeType.CurrentHealth).myBaseValue -= aDamageAmount;
     Debug.Log("Actor " + myName + " took " + aDamageAmount + " " + aDamageType + " damages from " + aSource.myName);
 }
Ejemplo n.º 28
0
 // Use this for initialization
 void Start()
 {
     player_ca   = player.GetComponent <CombatActor>();
     player_data = player.GetComponent <PlayerData>();
 }
Ejemplo n.º 29
0
 /// <summary>
 /// Creates the disabled state for the given actor.
 /// </summary>
 /// <param name="actor">The actor to effect.</param>
 public DisabledState(CombatActor actor)
 {
     this.actor = actor;
 }
Ejemplo n.º 30
0
 // Use this for initialization
 void Start()
 {
     player_ca = player.GetComponent <CombatActor>();
     bar       = gameObject.GetComponent <Slider>();
 }