Example #1
0
 // Use this for initialization
 private void Start()
 {
     if (target == null)
     {
         GameObject player = GameObject.FindGameObjectWithTag(TagsAndLayers.PLAYER);
         target = player.transform;
         characterController = player.GetComponent <CombinedController>();
     }
     zOffset          = (transform.position - target.position).z;
     transform.parent = null;
 }
Example #2
0
 // Use this for initialization
 void Start()
 {
     try
     {
         parentRB   = GetComponentInParent <Rigidbody2D>();
         player     = GetComponentInParent <CombinedController>();
         pickup     = player.ItemHoldingTransform;
         prevFacing = player.GetFacingDirection();
     }
     catch { }
 }
Example #3
0
 protected void Start()
 {
     player = GameObject.FindGameObjectWithTag(TagsAndLayers.PLAYER);
     characterController = player.GetComponent <CombinedController>();
 }