阶段2/IUpdateable接口适配
This commit is contained in:
@@ -8,9 +8,9 @@ namespace Demo.Game
|
||||
public interface IUpdateable
|
||||
{
|
||||
/// <summary>
|
||||
/// 直接Update调用,无递归
|
||||
/// 扁平化优化Update调用,直接更新对象自身(无递归遍历子对象)
|
||||
/// </summary>
|
||||
void DoUpdate(float currentTime, float deltaTime, ScriptableObject.TickType tickType);
|
||||
void FlatOptimizationUpdate(float currentTime, float deltaTime, ScriptableObject.TickType tickType);
|
||||
|
||||
/// <summary>
|
||||
/// 对象名称,用于调试
|
||||
|
||||
@@ -113,7 +113,7 @@ namespace Demo.Game
|
||||
{
|
||||
if (permanentObjects[i]?.IsUpdateReady == true)
|
||||
{
|
||||
permanentObjects[i].DoUpdate(currentTime, deltaTime, tickType);
|
||||
permanentObjects[i].FlatOptimizationUpdate(currentTime, deltaTime, tickType);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -126,7 +126,7 @@ namespace Demo.Game
|
||||
continue;
|
||||
}
|
||||
|
||||
activeObjects[i].DoUpdate(currentTime, deltaTime, tickType);
|
||||
activeObjects[i].FlatOptimizationUpdate(currentTime, deltaTime, tickType);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user