// Use For Guests and Unique Characters /* public void TargetReached() * { * if(!isLeaving) * { * SpawnManager.GetInstance.PreStartCourt(); * } * else * { * SpawnManager.GetInstance.CheckCourtUse(); * DestroyImmediate(this.gameObject); * } * } */ public void SetupCharacter(UnitInformationData newUnitInformation) { unitInformation = new UnitInformationData(); int randomCode = UnityEngine.Random.Range(0, 100); unitInformation.unitGenericName = newUnitInformation.unitName; unitInformation.unitName = newUnitInformation.unitName + randomCode.ToString(); unitInformation.attackType = newUnitInformation.attackType; unitInformation.curhealth = newUnitInformation.maxHealth; unitInformation.maxHealth = newUnitInformation.maxHealth; unitInformation.minDamage = newUnitInformation.minDamage; unitInformation.maxDamage = newUnitInformation.maxDamage; unitInformation.curSpeed = newUnitInformation.origSpeed; unitInformation.origSpeed = newUnitInformation.origSpeed; unitInformation.range = newUnitInformation.range; unitInformation.unitCooldown = newUnitInformation.unitCooldown; unitInformation.prefabDataPath = newUnitInformation.prefabDataPath; unitInformation.deathThreshold = newUnitInformation.deathThreshold; unitInformation.morale = newUnitInformation.morale; unitInformation.currentState = newUnitInformation.currentState; unitInformation.wieldedWeapon = newUnitInformation.wieldedWeapon; unitInformation.buffList = new List <BaseBuffInformationData>(); if (newUnitInformation.buffList != null && newUnitInformation.buffList.Count > 0) { for (int i = 0; i < newUnitInformation.buffList.Count; i++) { BaseBuffInformationData tmp = new BaseBuffInformationData(); unitInformation.buffList.Add(tmp); } } myRange.myCharacter = this; myRange.UpdateTotalRange(); Debug.Log("But this one keeps on coming in last"); myMovements.speed = unitInformation.RealSpeed; ChangeWeaponWield(unitInformation.wieldedWeapon); UpdateStats(); }
public void AddBuff(BaseBuffInformationData thisBuff) { buffList.Add(thisBuff); }
public void RemoveBuff(BaseBuffInformationData thisBuff) { buffList.Remove(thisBuff); ReceiveDamage(thisBuff.effectAmount, thisBuff.targetStats); }
public void AddBuff(BaseBuffInformationData thisBuff) { unitInformation.AddBuff(thisBuff); UpdateStats(); }