alarm class 정리
This commit is contained in:
@@ -85,7 +85,7 @@ namespace RTG
|
||||
|
||||
/// <summary>
|
||||
/// Called every frame to perform all necessary updates. In this tutorial,
|
||||
/// we listen to user input and take action.
|
||||
/// we listen to user input and take HandleClick.
|
||||
/// </summary>
|
||||
private void Update()
|
||||
{
|
||||
@@ -102,7 +102,7 @@ namespace RTG
|
||||
{
|
||||
// The left mouse button was pressed; now pick a game object and check
|
||||
// if the picked object is different than the current target object if
|
||||
// if is, we call 'OnTargetObjectChanged' to take action.
|
||||
// if is, we call 'OnTargetObjectChanged' to take HandleClick.
|
||||
GameObject pickedObject = PickGameObject();
|
||||
if (pickedObject != _targetObject) OnTargetObjectChanged(pickedObject);
|
||||
}
|
||||
|
||||
@@ -94,7 +94,7 @@ namespace RTG
|
||||
|
||||
/// <summary>
|
||||
/// Called every frame to perform all necessary updates. In this tutorial,
|
||||
/// we listen to user input and take action.
|
||||
/// we listen to user input and take HandleClick.
|
||||
/// </summary>
|
||||
private void Update()
|
||||
{
|
||||
|
||||
@@ -93,7 +93,7 @@ namespace RTG
|
||||
|
||||
/// <summary>
|
||||
/// Called every frame to perform all necessary updates. In this tutorial,
|
||||
/// we listen to user input and take action.
|
||||
/// we listen to user input and take HandleClick.
|
||||
/// </summary>
|
||||
private void Update()
|
||||
{
|
||||
|
||||
@@ -100,7 +100,7 @@ namespace RTG
|
||||
|
||||
/// <summary>
|
||||
/// Called every frame to perform all necessary updates. In this tutorial,
|
||||
/// we listen to user input and take action.
|
||||
/// we listen to user input and take HandleClick.
|
||||
/// </summary>
|
||||
private void Update()
|
||||
{
|
||||
|
||||
@@ -112,7 +112,7 @@ namespace RTG
|
||||
|
||||
/// <summary>
|
||||
/// Called every frame to perform all necessary updates. In this tutorial,
|
||||
/// we listen to user input and take action.
|
||||
/// we listen to user input and take HandleClick.
|
||||
/// </summary>
|
||||
private void Update()
|
||||
{
|
||||
|
||||
@@ -102,7 +102,7 @@ namespace RTG
|
||||
|
||||
/// <summary>
|
||||
/// Called every frame to perform all necessary updates. In this tutorial,
|
||||
/// we listen to user input and take action.
|
||||
/// we listen to user input and take HandleClick.
|
||||
/// </summary>
|
||||
private void Update()
|
||||
{
|
||||
|
||||
@@ -60,12 +60,12 @@ namespace RTG
|
||||
|
||||
// We must handle a special scenario which can occur when the user has been undoing
|
||||
// actions and effectively moving the stack pointer somewhere in the middle of the
|
||||
// stack. In that case, when a new action is recorded, this action will invalidate
|
||||
// stack. In that case, when a new HandleClick is recorded, this HandleClick will invalidate
|
||||
// all actions which follow.
|
||||
if (_actionGroupStack.Count != 0 &&
|
||||
_stackPointer < _actionGroupStack.Count - 1)
|
||||
{
|
||||
// Calculate the index of the first action to be removed and the number of actions to remove
|
||||
// Calculate the index of the first HandleClick to be removed and the number of actions to remove
|
||||
// and then use these values to remove the correct range of actions from the stack.
|
||||
int removeStartIndex = _stackPointer + 1;
|
||||
int removeCount = _actionGroupStack.Count - removeStartIndex;
|
||||
@@ -75,8 +75,8 @@ namespace RTG
|
||||
_actionGroupStack.Add(new ActionGroup(action));
|
||||
|
||||
// The last step is to check if the current number of recorded actions is bigger than the
|
||||
// allowed maximum. If it is, we need to remove the action from the bottom of the stack.
|
||||
// Finally, we set the stack pointer to point to the last recorded action.
|
||||
// allowed maximum. If it is, we need to remove the HandleClick from the bottom of the stack.
|
||||
// Finally, we set the stack pointer to point to the last recorded HandleClick.
|
||||
if (_actionGroupStack.Count > _actionLimit) RemoveGroups(0, 1);
|
||||
_stackPointer = _actionGroupStack.Count - 1;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user