void Start() { rb = GetComponent <Rigidbody2D>(); stateComponent = GetComponent <StateComponent>(); stateComponent.iniPosition = rb.position; GameObject theWorld = GameObject.Find("TheWorld"); worldComponent = theWorld.GetComponent <FreezeWorldComponent>(); nonObstacles.Add("Orb"); nonObstacles.Add("Key"); nonObstacles.Add("Door"); nonObstacles.Add("Enemy"); nonObstacles.Add("Upper"); nonObstacles.Add("Downer"); nonObstacles.Add("Hazard"); nonObstacles.Add("Platform"); nonObstacles.Add("DialogueTrigger"); nonObstacles.Add("GrabbableObject"); nonObstacles.Add("Player"); nonObstacles.Add("Button"); nonObstacles.Add("IceBall"); nonObstacles.Add("FireBall"); nonObstacles.Add("Trigger"); nonObstacles.Add("DefenseRange"); nonObstacles.Add("Barrier"); nonObstacles.Add("FireBallUpgrade"); jumpTimeCounter = jumpTime; }
void Start() { if (PlayerPrefs.HasKey("Time Freeze Limit")) { timeFreezeLimit = PlayerPrefs.GetFloat("Time Freeze Limit"); timeFreezeCooldown = PlayerPrefs.GetFloat("Time Freeze Cooldown"); } instance = this; }
void Start() { rb = GetComponent <Rigidbody2D>(); iniPosition = rb.position; GameObject theWorld = GameObject.Find("TheWorld"); worldComponent = theWorld.GetComponent <FreezeWorldComponent>(); FreezeWorldComponent.FreezeEvent += AddToTimeStopCounter; StartCoroutine("RespawnRockAfterTime"); }