private void CacheComponents() { stickmanEvents = GetComponent <StickmanEvents>(); enemyAnimationEvents = GetComponent <EnemyAnimationEvents>(); splineFollower = GetComponent <SplineFollower>(); splineProjector = GetComponent <SplineProjector>(); }
private void Awake() { Debug.Log($"<color=red>Awake Main Projector in gameobject {gameObject.name}</color>"); RailwaysManager.Instance.CalculateMainRailway(); splineProjector = GetComponent <SplineProjector>(); splineProjector.spline = FindObjectsOfType <SplineComputer>() .First(c => c.name.Equals("Middle")); }
public override void OnInspectorGUI() { SplineProjector user = (SplineProjector)target; if (user.mode == SplineProjector.Mode.Accurate) { showAveraging = false; } else { showAveraging = true; } base.OnInspectorGUI(); }
protected override void OnSceneGUI() { base.OnSceneGUI(); for (int i = 0; i < users.Length; i++) { SplineProjector user = (SplineProjector)users[i]; if (user.spline == null) { return; } if (!user.autoProject) { return; } DrawResult(user.result); } }
private void Start() { projector = PlayerManager.Instance.GetComponent <SplineProjector>(); }
void Start() { rb = GetComponent <Rigidbody>(); projector = GetComponent <SplineProjector>(); }
private void CacheComponents() { splineFollower = GetComponent <SplineFollower>(); splineProjector = GetComponent <SplineProjector>(); }