private int GetSizeDestroyAbilityHitbox(NetworkWriter dummyWriter) { dummyWriter.WriteInt32(_nextHitboxDestroyed.Count); for (int i = 0; i < _nextHitboxDestroyed.Count; i++) { dummyWriter.WriteAbilityCastData(_nextHitboxDestroyed[i]); } return(dummyWriter.Length); }
private int GetSizeCastAbility(NetworkWriter dummyWriter) { dummyWriter.WriteInt32(_nextAbilitiesCast.Count); for (int i = 0; i < _nextAbilitiesCast.Count; i++) { dummyWriter.WriteAbilityCastData(_nextAbilitiesCast[i]); } return(dummyWriter.Length); }
private void RegisterCastAbility(SyncableVariable var, NetworkWriter writer) { writer.WriteInt32(_nextAbilitiesCast.Count); for (int i = 0; i < _nextAbilitiesCast.Count; i++) { writer.WriteAbilityCastData(_nextAbilitiesCast[i]); } _nextAbilitiesCast.Clear(); }
private void RegisterDestroyAbilityHitbox(SyncableVariable var, NetworkWriter writer) { writer.WriteInt32(_nextHitboxDestroyed.Count); for (int i = 0; i < _nextHitboxDestroyed.Count; i++) { writer.WriteAbilityCastData(_nextHitboxDestroyed[i]); } _nextHitboxDestroyed.Clear(); }
public static void WriteAbilityCastResult(this NetworkWriter writer, AbilityCastResult result) { //CastData writer.WriteAbilityCastData(result.CastData); //Main writer.WriteInt32((int)result.ResultType); writer.WriteGameObject(result.Victim.gameObject); writer.WriteVector3(result.Impact); writer.WriteVector3(result.KnockbackApplied); //Resources Changes AbilityResourceImpactData[] resourceChanges = result.ResourcesChanges; writer.WriteInt32(resourceChanges.Length); for (int i = 0; i < resourceChanges.Length; i++) { writer.WriteAbilityResourceImpactData(resourceChanges[i]); } }