Example #1
0
 private void CacheComponents()
 {
     stickmanEvents       = GetComponent <StickmanEvents>();
     enemyAnimationEvents = GetComponent <EnemyAnimationEvents>();
     splineFollower       = GetComponent <SplineFollower>();
     splineProjector      = GetComponent <SplineProjector>();
 }
Example #2
0
 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"));
 }
Example #3
0
        public override void OnInspectorGUI()
        {
            SplineProjector user = (SplineProjector)target;

            if (user.mode == SplineProjector.Mode.Accurate)
            {
                showAveraging = false;
            }
            else
            {
                showAveraging = true;
            }
            base.OnInspectorGUI();
        }
Example #4
0
 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);
     }
 }
Example #5
0
 private void Start()
 {
     projector = PlayerManager.Instance.GetComponent <SplineProjector>();
 }
Example #6
0
 void Start()
 {
     rb        = GetComponent <Rigidbody>();
     projector = GetComponent <SplineProjector>();
 }
Example #7
0
 private void CacheComponents()
 {
     splineFollower  = GetComponent <SplineFollower>();
     splineProjector = GetComponent <SplineProjector>();
 }