// Token: 0x0600239F RID: 9119 RVA: 0x00412CE8 File Offset: 0x00410EE8 public void cacheTrapHitPos(byte trapKind, ArmyGroup ag) { TrapBehavior trapBehavior = (trapKind != 0) ? this.woodBehavior : this.suprsBehavior; if (trapBehavior != null) { int currentSoldierCount = ag.CurrentSoldierCount; Vector3 vector = Vector3.zero; for (int i = 0; i < currentSoldierCount; i++) { vector += ag.soldiers[i].transform.position; } vector /= (float)currentSoldierCount; trapBehavior.targetPosCache.Add(vector); } }
private void Start() { _behavior = GetComponent <TrapBehavior>(); }