public override void Update(float delta) { if (_threadWorker == null) { return; } if (_playing) { if (CurrentPosition == AmountOfFrames - 1) { MainThreadInvoker.Enqueue(() => Finished?.Invoke()); _playing = false; return; } NextKeyFrame(); } else if (_rewindPlannedPos > 0) { Rewind?.Invoke(true); _currentPosition = _rewindPlannedPos; _rewindPlannedPos = -1; _threadWorker?.Enqueue(() => { _data.ShowAt(_actualTimestamps ![_currentPosition], true); Rewind?.Invoke(false); });
//private bool rewinding = false; private void Start() { motor = GetComponent <Albane_PlayerMotor>(); animator = GetComponent <Animator>(); rewind = GameObject.FindObjectOfType <Rewind>(); rewindVideo = GameObject.FindObjectOfType <RewindVideo>(); }
void Awake() { // Get Components rewind = GetComponent <Rewind>(); sr = GetComponent <SpriteRenderer>(); bc2d = GetComponent <BoxCollider2D>(); }
protected virtual void Start() { //In child: First it's own specified stuff, then base.Start() trscript = GetComponent <Rewind>(); //assigning values to velX and velY individually in each sub-class rigidbody = GetComponent <Rigidbody2D>(); velocity = new Vector2(velX, velY); rigidbody.velocity = velocity; StartCoroutine(Die()); }
void Start() { gameMaster = GameMaster.instance; rewind = this.GetComponent <Rewind>(); cam = Camera.main; toGo = this.transform.position; toLook = new Vector3(this.transform.rotation.eulerAngles.x, this.transform.rotation.eulerAngles.y, this.transform.rotation.eulerAngles.z); }
public void IncreaseRewindValue() { if (SceneManager.GetActiveScene().name == "Play") { if (Rewind < 3) { Rewind++; } SliderRewind.value = Rewind; rewindCounter.text = Rewind.ToString() + "/3"; } }
private void Start() { trscript = GetComponent <Rewind>(); rigidbody = GetComponent <Rigidbody2D>(); int i = 0; while (i != 1 && i != -1) { i = UnityEngine.Random.Range(-1, 2); } velocity = new Vector2(speed * i, 0); velocityBackup = velocity; }
void Awake() { S = this; trailPrefab = Resources.Load("Rewind Trail"); line = ((GameObject)trailPrefab).GetComponent<LineRenderer>(); rewindAudio = GetComponent<AudioSource>(); Reset(); Toggle(false); Events.Register<OnPauseEvent>(Pause); Events.Register<OnResetEvent>(Reset); Events.Register<OnDeathEvent>(Reset); }
void Start() { ++count; active = false; flame = transform.Find("Flame").gameObject; flame.SetActive(false); altarLight = transform.Find("Torchlight").gameObject; altarLight.SetActive(false); // Get references to the different ability scripts walk = Walk.S; teleport = Teleport.S; rewind = Rewind.S; }
void Awake() { activator = GetComponentInChildren<Activator>(); eye = GetComponentInChildren<Eye>(); inventory = GetComponentInChildren<Inventory>(); lastPositionKeeper = GetComponentInChildren<LastPositionKeeper>(); head = GetComponentInChildren<Head>(); cameraPlace = GetComponentInChildren<CameraPlace>(); undo = GetComponentInChildren<Undo>(); characterController = GetComponentInChildren<CharacterController>(); rewind = GetComponentInChildren<Rewind>(); slowmo = GetComponentInChildren<Slowmo>(); gravity = GetComponentInChildren<Gravity>(); all.Add(this); }
void Awake() { player = GameObject.FindWithTag("player"); pc = player.GetComponent <PlayerControl> (); if (Rewind._instance == null) { Rewind._instance = this; _instance.Init(); } else { if (Rewind._instance != this) { throw new InvalidOperationException("Cannot have two instances of a Singleton"); } } }
protected void Start() { hasShield = true; isRewinding = false; rocketCounter = 0; fps = 60; RewindSecondsLimit = 3; Health = 100; Rewind = 0; RewindSeconds = 3; FrameCounter = 1; if (SceneManager.GetActiveScene().name == "Play") { rocketCounterText.text = rocketCounter.ToString(); rewindCounter.text = Rewind.ToString() + "/3"; } }
IEnumerator rewindCourtine() { int counter = 0; int SpareCounter = 0; gameObject.GetComponent <Rigidbody2D>().velocity = new Vector2(0.0f, 0.0f); while (counter < 60) { if (oldDataList.Count - counter - 1 >= 0) { this.Health = oldDataList[oldDataList.Count - counter - 1].oldHealth; this.transform.position = oldDataList[oldDataList.Count - counter - 1].OldPosition; this.transform.rotation = oldDataList[oldDataList.Count - counter - 1].OldRotation; if (SceneManager.GetActiveScene().name == "Play") { SliderHealth.value = Health; } } else { this.Health = SpareData[SpareData.Count - SpareCounter - 1].oldHealth; this.transform.position = SpareData[SpareData.Count - SpareCounter - 1].OldPosition; this.transform.rotation = SpareData[SpareData.Count - SpareCounter - 1].OldRotation; if (SceneManager.GetActiveScene().name == "Play") { SliderHealth.value = Health; } SpareCounter++; } counter++; yield return(new WaitForSeconds(0)); } this.gameObject.GetComponent <PlayerController>().SetPlayerActive(); Rewind = 0; if (SceneManager.GetActiveScene().name == "Play") { SliderRewind.value = Rewind; rewindCounter.text = Rewind.ToString() + "/3"; } isRewinding = false; }
// Use this for initialization void Start() { _rewind = gameObject.GetComponent <Rewind>(); }
protected virtual void Start() { trscript = GetComponent <Rewind>(); anim = gameObject.GetComponent <Animator>(); lookingRight = true; }
void Awake() { rewind = GetComponent <Rewind>(); animator = GetComponentInChildren <Animator>(); }
void Awake() { rewind = GetComponent <Rewind>(); }
void Start() { // Get Components Rotation = Mirror.transform.rotation; rewind = GetComponent <Rewind>(); }
private void Timer_Tick(object sender, EventArgs e) { mode = true; Rewind?.Invoke(this, new EventArgs()); }
void Awake() { destination = GetComponent <AIDestinationSetter>(); ai = GetComponent <AIPath>(); rewind = GetComponent <Rewind>(); }