Update copyright header. Normalize line endings to LF.
This commit is contained in:
@@ -1,17 +1,17 @@
|
||||
#region Copyright & License Information
|
||||
/*
|
||||
* Copyright 2007-2010 The OpenRA Developers (see AUTHORS)
|
||||
* This file is part of OpenRA, which is free software. It is made
|
||||
* available to you under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation. For more information,
|
||||
* see LICENSE.
|
||||
*/
|
||||
#region Copyright & License Information
|
||||
/*
|
||||
* Copyright 2007-2011 The OpenRA Developers (see AUTHORS)
|
||||
* This file is part of OpenRA, which is free software. It is made
|
||||
* available to you under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation. For more information,
|
||||
* see COPYING.
|
||||
*/
|
||||
#endregion
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
using System.Linq;
|
||||
|
||||
namespace OpenRA.Traits
|
||||
{
|
||||
class ScreenShakerInfo : TraitInfo<ScreenShaker> {}
|
||||
@@ -22,17 +22,17 @@ namespace OpenRA.Traits
|
||||
List<ShakeEffect> shakeEffects = new List<ShakeEffect>();
|
||||
|
||||
public void Tick (Actor self)
|
||||
{
|
||||
if(shakeEffects.Any())
|
||||
{
|
||||
if(shakeEffects.Any())
|
||||
{
|
||||
Game.viewport.Scroll(GetScrollOffset(), true);
|
||||
shakeEffects.RemoveAll(t => t.ExpiryTime == ticks);
|
||||
shakeEffects.RemoveAll(t => t.ExpiryTime == ticks);
|
||||
}
|
||||
ticks++;
|
||||
}
|
||||
|
||||
public void AddEffect(int time, float2 position, int intensity)
|
||||
{
|
||||
{
|
||||
shakeEffects.Add(new ShakeEffect { ExpiryTime = ticks + time, Position = position, Intensity = intensity });
|
||||
}
|
||||
|
||||
@@ -56,7 +56,7 @@ namespace OpenRA.Traits
|
||||
|
||||
return Math.Min(intensity, 10);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
class ShakeEffect { public int ExpiryTime; public float2 Position; public int Intensity; }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user