void Start()
 {
     stateController = GameObject.FindWithTag("Player").GetComponent<TurtleStateController>();
     forceVector = transform.forward * magnitude;
     particleSystem = GetComponent<ParticleSystem>();
     particleSystem.Play();
 }
 void Start()
 {
     player = GameObject.FindWithTag("Player");
     playerStateController = player.GetComponent<TurtleStateController>();
     particleSystem = GetComponent<ParticleSystem>();
 }
Example #3
0
 void Awake()
 {
     player = GameObject.FindWithTag("Player");
     turtleController = player.GetComponent<TurtleController>();
     playerStateController = player.GetComponent<TurtleStateController>();
     playerMovementController = player.GetComponent<TurtleMovementController>();
     waterSurfaceLevel = playerStateController.WaterSurfaceLevel();
 }
Example #4
0
 void Start()
 {
     anim = GetComponent<Animator>();
     col = GetComponent<CapsuleCollider>();
     controller = GetComponent<CharacterController>();
     followingFish = GetComponent<FollowingFish>();
     barrierController = GetComponent<BarrierController>();
     stateController = GetComponent<TurtleStateController>();
     speedInMedium = 16.5f;
     minSpeedInMedium = 16.5f;
     maxSpeedInMedium = 20f;
     targetSpeedInMedium = 16.5f;
     currentlyAccelerating = false;
     initialMinimumSpeed = minSpeedInMedium;
     // FIXME remove the barriers stuff
     if (sequentialBarriers.Count > 0){
       nextBarrier = sequentialBarriers[0];
       nextBarrierInstance = barrierController.getBarrierInstanceFromBarrierGameObject(nextBarrier);
     }
 }
 void Start()
 {
     animator = GetComponent<Animator>();
     capsuleCollider = GetComponent<CapsuleCollider>();
     characterController = GetComponent<CharacterController>();
     stateController = GetComponent<TurtleStateController>();
     currentDragCoefficientInWater = lowSpeedDragCoefficientInWater;
     dragDampener = minimumDragDampener;
     maximumSwimSpeed = defaultMaximumSwimSpeed;
 }