public void InitWithTargetPositionAndTravelTime(uint travelTime, Vector3 spawnWorldLocation, int targetBoardX, int targetBoardZ, TeamType ownerTeam, Entity attacker, HealthFragment healthFrag, ProjectileTypeVO projectileType, List <Buff> appliedBuffs, FactionType faction) { this.InitWithEverything(travelTime, 0, 0, spawnWorldLocation, null, targetBoardX, targetBoardZ, ownerTeam, attacker, healthFrag, projectileType, null); this.OwnerFaction = faction; this.AppliedBuffs = appliedBuffs; this.SetDefaultTargetWorldLocation(0f); }
private void InitWithEverything(uint travelTime, int spawnBoardX, int spawnBoardZ, Vector3 spawnWorldLocation, SmartEntity target, int targetBoardX, int targetBoardZ, TeamType ownerTeam, Entity attacker, HealthFragment healthFrag, ProjectileTypeVO projectileType, GameObject gunLocator) { this.IsDeflection = false; this.SetTravelTime(travelTime); this.SpawnBoardX = spawnBoardX; this.SpawnBoardZ = spawnBoardZ; this.SpawnWorldLocation = spawnWorldLocation; this.GunLocator = gunLocator; this.SetTarget(target); this.TargetBoardX = targetBoardX; this.TargetBoardZ = targetBoardZ; this.OwnerTeam = ownerTeam; this.Owner = (SmartEntity)attacker; this.HealthFrag = healthFrag; this.ProjectileType = projectileType; }
public bool InitWithTarget(int spawnBoardX, int spawnBoardZ, Vector3 spawnWorldLocation, Target target, TeamType ownerTeam, Entity attacker, HealthFragment healthFrag, ProjectileTypeVO projectileTypeVO, List <Buff> appliedBuffs, FactionType faction, GameObject gunLocator) { if (target == null) { return(false); } this.OwnerFaction = faction; this.AppliedBuffs = appliedBuffs; this.InitWithEverything(0u, spawnBoardX, spawnBoardZ, spawnWorldLocation, target.TargetEntity, target.TargetBoardX, target.TargetBoardZ, ownerTeam, attacker, healthFrag, projectileTypeVO, gunLocator); if (this.ProjectileType.IsBeam) { this.SetupBeam(); } else { this.SetTargetWorldLocation(target.TargetWorldLocation); } return(true); }