void Start() { characterController = GetComponent <CharacterController>(); animator = GetComponent <Animator>(); joystick = GameObject.Find("Variable Joystick").GetComponent <VariableJoystick>(); state = ActionState.Idle; camera = GameObject.Find("FirstPersonView").GetComponent <Camera>(); this.cameraOffset = Camera.main.transform.position - this.transform.position; hpControl = (HealthBarControl)GameObject.FindGameObjectWithTag("HPBar").GetComponent(typeof(HealthBarControl)); coldControl = (ManaBarControl)GameObject.FindGameObjectWithTag("ManaBar").GetComponent(typeof(ManaBarControl)); frostEffect = GameObject.Find("FirstPersonView").GetComponent <FrostEffect>(); if (GameManager.instance != null) { this.hp = GameManager.instance.hp; this.coldHp = GameManager.instance.coldHp; hpControl.setValue(this.hp); coldControl.setValue(this.coldHp); this.transform.position = GameManager.instance.position; this.transform.rotation = GameManager.instance.rotation; } Debug.Log("Start for Player: hp " + this.hp + ", coldHp: " + this.coldHp + ", position: " + this.transform.position + "instance position: " + GameManager.instance.position); }
// Start is called before the first frame update void Start() { counting = true; currentTime = 0f; player = (PlayerController)GameObject.Find("Player").GetComponent(typeof(PlayerController)); frostEffect = GameObject.Find("FirstPersonView").GetComponent <FrostEffect>(); }
void Start() { _freezeLevel = 0; _freezed = false; _inWarmArea = false; frostEffect = Camera.main.GetComponent <FrostEffect>(); StartCoroutine(StartFrostEffect()); }
// Use this for initialization void Awake() { Sprite = GetComponent <SpriteRenderer>(); if ((Information.Instance?.NameLevel == "Level7") || (Information.Instance?.NameLevel == "Level8")) { GetComponent <ColdRooster>().enabled = true; } frostEffect = GameObject.Find("Main Camera").GetComponent <FrostEffect>(); temperature = 0f; }
private void EnableScreenFrost(bool isOn, bool bDisableFirst = true) { if (bDisableFirst) { this.DisableScreenEffect(); } if (isOn) { if (GameLevelManager.IsPostProcessReachQuality(300)) { if (CamerasMgr.MainCameraRoot == null) { return; } this.m_frostEffect = CamerasMgr.MainCameraRoot.get_gameObject().AddMissingComponent <FrostEffect>(); this.m_frostEffect.Initialization(); this.m_frostEffect.set_enabled(true); } } else if (this.m_frostEffect != null) { this.m_frostEffect.set_enabled(false); } }
// Use this for initialization void Start() { frostScript = GetComponent <FrostEffect>(); }
// Use this for initialization void Start() { s = this; frost = GetComponent <FrostEffect> (); }
void Start() { this.player = GameObject.Find("FPSCamera"); this.playerScript = player.GetComponent <FrostEffect>(); this.playerScript.FrostAmount = 0f; // Initialize lens script on start }
private void Start() { Cursor.visible = false; frostEffect = camera.GetComponent <FrostEffect>(); }