public override void Init(Critter c, BehaviorData d, float score, int weaponIndex, int attackIndex) { base.Init(c, d, score, weaponIndex, attackIndex); weapon = _critter.GetInventorySlot(weaponIndex) as Weapon; if (weapon == null) { return; } if (attackIndex <= weapon.data.attacks.Length) { attackData = weapon.data.attacks[attackIndex]; } if (attackData != null) { if (attackData.projectiles.Count > 0) { maxRange = 10; minRange = 4; } else { maxRange = attackData.stepDistance + attackData.range + attackData.radius * 0.5f; minRange = maxRange - attackData.radius * 1.5f; } } }
virtual public void Init(Critter c, BehaviorData d, float score, int weaponIndex, int attackIndex) { data = d; _critter = c; scoreMultiplier = score; this.weaponIndex = weaponIndex; this.attackIndex = attackIndex; }
public override void Init(Critter c, BehaviorData d, float score, int weaponIndex, int attackIndex) { base.Init(c, d, score, weaponIndex, attackIndex); }