public void StartRecallDisc(DiscScript disc) { DiscTrajectoryParameters trajectoryParameters = DiscTrajectoryFactory.GetTrajectory(recallCompetence, disc.transform.position, _player.transform.position, DiscManager.Instance.GetAllThrowedDiscs, DiscManager.Instance.GetInRangeDiscs, disc); disc.SetIsBeingRecalled(true); disc.StartTrajectory(trajectoryParameters, null); currentlyInUseDiscs.Add(disc); disc.OnTrajectoryStopped += RemoveDiscFromInUse; OnSpecialLaunch?.Invoke(); }
public void LaunchThrowCompetenceForReal() { currentlyInUseDiscs = new List <DiscScript>(); DiscScript newDisc = DiscManager.Instance.TakeFirstDiscFromPossessedDiscs(); if (newDisc == null) { //Debug.LogWarning("NO DISK TO THROW"); return; } DiscTrajectoryParameters trajectoryParameters = DiscTrajectoryFactory.GetTrajectory(throwCompetence, _player.transform.position, GetInRangeThrowTargetPosition(currentThrowPosition), DiscManager.Instance.GetAllThrowedDiscs, DiscManager.Instance.GetInRangeDiscs, newDisc); newDisc.SetIsBeingRecalled(false); newDisc.SetRetreivableByPlayer(false); newDisc.StartTrajectory(trajectoryParameters, currentObjLauncher); currentlyInUseDiscs.Add(newDisc); newDisc.OnTrajectoryStopped += RemoveDiscFromInUse; newDisc.OnReachedTrajectoryEnd += RemoveDiscFromInUse; }