// Start is called before the first frame update
 void Start()
 {
     currentSprite          = gameObject.GetComponent <SpriteRenderer>().sprite;
     anim                   = GetComponent <Animator>();
     planeContoller.enabled = false;
     planeWeapon.enabled    = false;
     cam = cameraShake.GetComponent <CineCameraShake>();
 }
Beispiel #2
0
 void Awake()
 {
     camShake = cameraShake.GetComponent <CineCameraShake>();
     if (playerStats != null)
     {
         Destroy(playerStats);
     }
     else
     {
         playerStats = this;
     }
     DontDestroyOnLoad(this);
 }
    private void Awake()
    {
        cameraShake = GameObject.FindGameObjectWithTag("Camera");
        cam         = cameraShake.GetComponent <CineCameraShake>();

        currentController = GetComponent <CharacterController2D>();
        currentMovement   = GetComponent <PlayerMovement>();
        planeContoller    = GetComponent <PlaneBehavior>();
        weapon            = GetComponent <Weapon>();
        playerMelee       = GetComponent <PlayerMelee>();
        rb = GetComponent <Rigidbody2D>();

        planeContoller.enabled = false;

        planeWeapon         = GetComponent <PlaneWeapon>();
        planeWeapon.enabled = false;
        Debug.Log("Is plane enabled? " + planeContoller.enabled);
    }
Beispiel #4
0
 // Start is called before the first frame update
 void Start()
 {
     Debug.Log("Laser Created");
     cameraShake = GameObject.FindGameObjectWithTag("Camera");
     cam         = cameraShake.GetComponent <CineCameraShake>();
 }
Beispiel #5
0
 private void Awake()
 {
     cameraShake = GameObject.FindGameObjectWithTag("Camera");
     cam         = cameraShake.GetComponent <CineCameraShake>();
 }
    private bool fpChanged;         //  Keeps track in the change in transform of firePoint

    private void Awake()
    {
        cam = cameraShake.GetComponent <CineCameraShake>();
    }
Beispiel #7
0
 void Start()
 {
     cameraShake = GameObject.FindGameObjectWithTag("Camera");
     cam         = cameraShake.GetComponent <CineCameraShake>();
 }
Beispiel #8
0
 // Start is called before the first frame update
 void Start()
 {
     cam    = cameraShake.GetComponent <CineCameraShake>();
     anim   = GetComponent <Animator>();
     target = LayerMask.GetMask("boxingBag");
 }