Example #1
0
 void Start()
 {
     movement = gameObject.GetComponent<LinearMover>();
     player = gameObject.GetComponent<PlayerController>();
     myTranny = transform;
     previousPosition = myTranny.position;
     trailHolder = new GameObject();
     trailHolder.name = "[TrailHolder]";
 }
Example #2
0
        void Start()
        {
            linearMover = GetComponent<LinearMover>();

            gameObject.SendMessage("AccelerateTo", new object[]{
                Constants.CycleSpeedMin,
                Constants.CycleAcceleration
            });

            if (cycle == null)
            {
                cycle = transform.Find("CycleBody").gameObject;
            }
        }