Exemplo n.º 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;
 }
Exemplo n.º 2
0
 // Use this for initialization
 void Start()
 {
     try
     {
         parentRB   = GetComponentInParent <Rigidbody2D>();
         player     = GetComponentInParent <CombinedController>();
         pickup     = player.ItemHoldingTransform;
         prevFacing = player.GetFacingDirection();
     }
     catch { }
 }
Exemplo n.º 3
0
 protected void Start()
 {
     player = GameObject.FindGameObjectWithTag(TagsAndLayers.PLAYER);
     characterController = player.GetComponent <CombinedController>();
 }