private void Start()
    {
        harpoon       = GameObject.FindGameObjectWithTag("Harpoon");
        harpoonScript = harpoon.GetComponent <HarpoonController>();

        seal         = GameObject.FindGameObjectWithTag("Seal");
        sealMovement = seal.GetComponent <SealMovement>();
    }
Example #2
0
    private void Start()
    {
        startPosition = transform.position;

        myRigidbody = GetComponent <Rigidbody2D>();
        seal        = GameObject.FindGameObjectWithTag("Seal");
        sealScript  = seal.GetComponent <SealMovement>();
        impactSound = GetComponent <AudioSource>();
    }
Example #3
0
    // Start is called before the first frame update
    void Awake()
    {
        startPoint        = transform.position;
        _rb2D             = GetComponent <Rigidbody2D>();
        material          = GetComponent <Renderer>().material;
        capsuleCollider2D = GetComponent <CapsuleCollider2D>();
        _collision        = GetComponent <Collision>();
        sealMovement      = GetComponent <SealMovement>();
        jumpScript        = GetComponent <SealJump>();
        hoverScript       = GetComponent <Hover>();

        scripts.Add(sealMovement);
        scripts.Add(jumpScript);
        scripts.Add(hoverScript);
        var vcam = GameObject.FindObjectOfType <CinemachineVirtualCamera>();

        vcam.Follow = this.gameObject.transform;
        WarpToPosition(PlayerManager.Instance.spawnPoint.transform.position);
        DisableAllSkillScripts();
        //scripts = gameObject.GetComponents<MonoBehaviour>();
    }