private void OnDestroy() { State.Destroy(); Viewer.FollowCamera.SetTarget(null); Destroy(_godRay.gameObject); _godRay = null; }
private void OnDestroy() { Destroy(_godRay.gameObject); _godRay = null; if (GoalManager.HasInstance) { GoalManager.Instance.UnregisterGoal(this); } }
private void Awake() { GoalManager.Instance.RegisterGoal(this); gameObject.layer = GoalManager.Instance.GoalLayer; _collider = GetComponent <Collider>(); _collider.isTrigger = true; _godRay = Instantiate(GoalManager.Instance.GoalGodRayPrefab, transform.parent); _godRay.SetupGoal(); }
private void Initialize(int id, Bird bird, BirdTypeData birdType) { Initialize(id); name = $"Player {Id}"; Bird = bird; Bird.Initialize(this, birdType); Controller.Initialize(this); State.Initialize(); _godRay = Instantiate(PlayerManager.Instance.PlayerGodRayPrefab, transform); _godRay.SetupPlayer(this); LogInfo(); }
public void Start(Transform tr) { Tr = tr; godray = tr.GetComponent <GodRay>(); }