void Awake() { lightBox = GetComponentInChildren <LightBoxBehavior>(); lightBox.IsMine = false; lightBox.IsActive = true; lightBox.DefaultScale = new Vector3(lightBoxScale, lightBoxScale); lightBox.ActiveScale = new Vector3(lightBoxScale, lightBoxScale); animator = GetComponent <Animator>(); circleCollider = GetComponent <CircleCollider2D>(); timeTaken = respawnTimer * -1f; }
// Use this for initialization void Awake() { animator = GetComponent<Animator>(); playersHit = new List<BaseExplorer>(); explosionSource = GetComponent<AudioSource>(); lightBox = GetComponentInChildren<LightBoxBehavior>(); lightBox.IsMine = false; lightBox.IsActive = true; lightBox.DefaultScale = new Vector3(lightBoxScale, lightBoxScale); lightBox.ActiveScale = new Vector3(lightBoxScale, lightBoxScale); }
public override void Awake() { base.Awake(); lightBox = GetComponentInChildren <LightBoxBehavior>(); lightBox.IsMine = photonView.isMine; lightBox.IsActive = true; lightBox.DefaultScale = new Vector3(GetLightboxScale(), GetLightboxScale()); lightBox.ActiveScale = new Vector3(GetLightboxScale(), GetLightboxScale()); if (photonView.isMine) { nameCanvas.SetActive(false); } }
// Use this for initialization void Awake() { lightBox = GetComponentInChildren <LightBoxBehavior>(); lightBox.IsMine = true; lightBox.IsActive = false; lightBox.DefaultScale = new Vector3(lightBoxScaleUnlit, lightBoxScaleUnlit); lightBox.ActiveScale = new Vector3(lightBoxScaleLit, lightBoxScaleLit); progressCanvas = transform.Find("BonfireCanvas").gameObject; positiveProgressBar = progressCanvas.transform.Find("PositiveProgress").GetComponent <Image>(); circleCollider = GetComponent <CircleCollider2D>(); spriteRenderer = GetComponent <SpriteRenderer>(); testingMode = false; soloMode = false; wasLitBefore = false; currentCharges = 0f; timeLit = 0f; }
public override void Awake() { base.Awake(); // Handle character's light box. lightBox = GetComponentInChildren <LightBoxBehavior>(); lightBox.IsMine = photonView.isMine; lightBox.IsActive = false; lightBox.IsDead = false; lightBox.DefaultScale = new Vector3(GetDefaultScale(), GetDefaultScale()); lightBox.ActiveScale = new Vector3(activeScale, activeScale); // Setup internal components and initialize object variables. healthCanvas = transform.Find("DreamerCanvas").gameObject; positiveHealthBar = healthCanvas.transform.Find("PositiveHealth").GetComponent <Image>(); myRenderer = GetComponent <Renderer>(); // Initialize state values. currentHealth = maxHealth; currentLives = maxLives; }