Differences

This shows you the differences between two versions of the page.

Link to this comparison view

pjv:laboratoare:2025:a01 [2025/10/06 13:41]
alexandru.gradinaru
pjv:laboratoare:2025:a01 [2025/10/06 13:54] (current)
alexandru.gradinaru [Concept general – „Replay / Ghost Car”]
Line 232: Line 232:
  
  
-=== 🧩 Exemple de design pattern-uri ===+=== Exemple de design pattern-uri ===
  
-==== 🔸 Command Pattern (pentru input) ====+==== Command Pattern (pentru input) ====
 <code csharp> <code csharp>
 public interface ICommand { public interface ICommand {
Line 253: Line 253:
 </​code>​ </​code>​
  
-==== 🔸 Observer Pattern (pentru UI) ====+==== Observer Pattern (pentru UI) ====
 <code csharp> <code csharp>
 public class Car : MonoBehaviour { public class Car : MonoBehaviour {
Line 273: Line 273:
 ---- ----
  
-==== 🎬 Concept general – „Replay / Ghost Car” ====+==== Concept general – „Replay / Ghost Car” ====
  
 În timpul cursei, fiecare acțiune de control (accelerare,​ frânare, viraj) este înregistrată ca un Command cu un timestamp. În timpul cursei, fiecare acțiune de control (accelerare,​ frânare, viraj) este înregistrată ca un Command cu un timestamp.
Line 365: Line 365:
     void Start() => startTime = Time.time;     void Start() => startTime = Time.time;
  
-    void Update()+    void FixedUpdate()
     {     {
         if (currentIndex >= replayCommands.Count) return;         if (currentIndex >= replayCommands.Count) return;
Line 397: Line 397:
  
  
-==== 🧩 Integrare în scenă ====+==== Integrare în scenă ====
  
 Creezi două mașini: Creezi două mașini:
Line 426: Line 426:
    
    
-=== 📚 Resurse recomandate ===+=== Resurse recomandate ===
   * Unity Manual – [[https://​docs.unity3d.com/​Manual/​MultipleCameras.html|Multiple Cameras and Split Screen]]   * Unity Manual – [[https://​docs.unity3d.com/​Manual/​MultipleCameras.html|Multiple Cameras and Split Screen]]
   * Unity Learn – [[https://​learn.unity.com/​project/​input-system|New Input System Fundamentals]]   * Unity Learn – [[https://​learn.unity.com/​project/​input-system|New Input System Fundamentals]]
pjv/laboratoare/2025/a01.1759747318.txt.gz · Last modified: 2025/10/06 13:41 by alexandru.gradinaru
CC Attribution-Share Alike 3.0 Unported
www.chimeric.de Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0