void Start() { ziggy = GameObject.FindGameObjectWithTag("screenShake").GetComponent <shake>(); m_enemy = GetComponent <Rigidbody2D>(); player_anim = GetComponent <Animator>(); target = GameObject.FindGameObjectWithTag("Player").GetComponent <Transform>(); }
public void ShakeCam(shake _power) { switch (_power) { case shake.very_small: StartCoroutine(Shake(duration[0], magnitude[0])); break; case shake.small: StartCoroutine(Shake(duration[1], magnitude[1])); break; case shake.medium: StartCoroutine(Shake(duration[2], magnitude[2])); break; case shake.big: StartCoroutine(Shake(duration[3], magnitude[3])); break; case shake.very_big: StartCoroutine(Shake(duration[4], magnitude[4])); break; case shake.extrem: StartCoroutine(Shake(duration[5], magnitude[5])); break; } }
private void Awake() { ziggy = GameObject.FindGameObjectWithTag("screenShake").GetComponent <shake>(); currenFart = maxFart; m_Rigidbody2D = GetComponent <Rigidbody2D>(); player_anim = GetComponent <Animator>(); if (OnLandEvent == null) { OnLandEvent = new UnityEvent(); } }
void Start() { m_dirAnimHash = Animator.StringToHash("facing"); m_deadStateAnimHash = Animator.StringToHash("dead"); startTilt = Input.acceleration; startTiltList = new Vector3[10]; m_startPos = transform.position; if (m_camShake == null) { m_camShake = GameObject.FindGameObjectWithTag("camshaker").GetComponent <shake>(); } }
void Start() { Screen.sleepTimeout = SleepTimeout.NeverSleep; m_dir = new Vector2(1.0f, 1.0f); m_origMoveSpeed = m_moveSpeed; if (m_player == null) { m_player = GameObject.FindGameObjectWithTag("Player").GetComponent <controller>(); } if (m_camShake == null) { m_camShake = GameObject.FindGameObjectWithTag("camshaker").GetComponent <shake>(); } m_animActionState = Animator.StringToHash("npcActionState"); // m_totalCurrent++; m_playerHurtArea.enabled = false; }
void Start() { e = this; offset = transform.position; }
// Start is called before the first frame update void Start() { shaking = GetComponent <shake>(); shaking.enabled = false; }
private void Awake() { Instance = this; cinemachineVirtualCamera = GetComponent <CinemachineVirtualCamera>(); }
void Start() { shake = GameObject.FindGameObjectWithTag("ScreenShake").GetComponent <shake>(); }
void Start() { m_dirAnimHash=Animator.StringToHash("facing"); m_deadStateAnimHash = Animator.StringToHash("dead"); startTilt=Input.acceleration; startTiltList = new Vector3[10]; m_startPos = transform.position; if (m_camShake == null) m_camShake = GameObject.FindGameObjectWithTag("camshaker").GetComponent<shake>(); }
private void Start() { rb = GetComponent <Rigidbody2D>(); shakee = GameObject.FindGameObjectWithTag("ScreenShake").GetComponent <shake>(); }
// Start is called before the first frame update void Start() { shake = GameObject.Find("Shake Manager").GetComponent <shake>(); }