Use Action<bool> for objective delegate type
This commit is contained in:
@@ -8,14 +8,15 @@
|
|||||||
*/
|
*/
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using OpenRA.FileFormats;
|
using OpenRA.FileFormats;
|
||||||
|
using OpenRA.Mods.RA.Activities;
|
||||||
using OpenRA.Mods.RA.Air;
|
using OpenRA.Mods.RA.Air;
|
||||||
using OpenRA.Mods.RA.Move;
|
using OpenRA.Mods.RA.Move;
|
||||||
using OpenRA.Scripting;
|
using OpenRA.Scripting;
|
||||||
using OpenRA.Traits;
|
using OpenRA.Traits;
|
||||||
using OpenRA.Mods.RA.Activities;
|
|
||||||
|
|
||||||
namespace OpenRA.Mods.RA.Missions
|
namespace OpenRA.Mods.RA.Missions
|
||||||
{
|
{
|
||||||
@@ -23,7 +24,7 @@ namespace OpenRA.Mods.RA.Missions
|
|||||||
|
|
||||||
class Allies01Script : IHasObjectives, IWorldLoaded, ITick
|
class Allies01Script : IHasObjectives, IWorldLoaded, ITick
|
||||||
{
|
{
|
||||||
public event ObjectivesUpdatedEventHandler OnObjectivesUpdated = notify => { };
|
public event Action<bool> OnObjectivesUpdated = notify => { };
|
||||||
|
|
||||||
public IEnumerable<Objective> Objectives { get { return objectives.Values; } }
|
public IEnumerable<Objective> Objectives { get { return objectives.Values; } }
|
||||||
|
|
||||||
|
|||||||
@@ -8,6 +8,7 @@
|
|||||||
*/
|
*/
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using OpenRA.FileFormats;
|
using OpenRA.FileFormats;
|
||||||
@@ -25,7 +26,7 @@ namespace OpenRA.Mods.RA.Missions
|
|||||||
|
|
||||||
class Allies02Script : IHasObjectives, IWorldLoaded, ITick
|
class Allies02Script : IHasObjectives, IWorldLoaded, ITick
|
||||||
{
|
{
|
||||||
public event ObjectivesUpdatedEventHandler OnObjectivesUpdated = notify => { };
|
public event Action<bool> OnObjectivesUpdated = notify => { };
|
||||||
|
|
||||||
public IEnumerable<Objective> Objectives { get { return objectives.Values; } }
|
public IEnumerable<Objective> Objectives { get { return objectives.Values; } }
|
||||||
|
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ namespace OpenRA.Mods.RA.Missions
|
|||||||
|
|
||||||
class Allies03Script : IHasObjectives, IWorldLoaded, ITick
|
class Allies03Script : IHasObjectives, IWorldLoaded, ITick
|
||||||
{
|
{
|
||||||
public event ObjectivesUpdatedEventHandler OnObjectivesUpdated = notify => { };
|
public event Action<bool> OnObjectivesUpdated = notify => { };
|
||||||
|
|
||||||
public IEnumerable<Objective> Objectives { get { return objectives.Values; } }
|
public IEnumerable<Objective> Objectives { get { return objectives.Values; } }
|
||||||
|
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ namespace OpenRA.Mods.RA.Missions
|
|||||||
|
|
||||||
class Allies04Script : IHasObjectives, IWorldLoaded, ITick
|
class Allies04Script : IHasObjectives, IWorldLoaded, ITick
|
||||||
{
|
{
|
||||||
public event ObjectivesUpdatedEventHandler OnObjectivesUpdated = notify => { };
|
public event Action<bool> OnObjectivesUpdated = notify => { };
|
||||||
|
|
||||||
public IEnumerable<Objective> Objectives { get { return objectives.Values; } }
|
public IEnumerable<Objective> Objectives { get { return objectives.Values; } }
|
||||||
|
|
||||||
|
|||||||
@@ -8,6 +8,7 @@
|
|||||||
*/
|
*/
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using OpenRA.Traits;
|
using OpenRA.Traits;
|
||||||
|
|
||||||
@@ -30,11 +31,9 @@ namespace OpenRA.Mods.RA.Missions
|
|||||||
public enum ObjectiveType { Primary, Secondary }
|
public enum ObjectiveType { Primary, Secondary }
|
||||||
public enum ObjectiveStatus { Inactive, InProgress, Completed, Failed }
|
public enum ObjectiveStatus { Inactive, InProgress, Completed, Failed }
|
||||||
|
|
||||||
public delegate void ObjectivesUpdatedEventHandler(bool notify);
|
|
||||||
|
|
||||||
public interface IHasObjectives
|
public interface IHasObjectives
|
||||||
{
|
{
|
||||||
event ObjectivesUpdatedEventHandler OnObjectivesUpdated;
|
event Action<bool> OnObjectivesUpdated;
|
||||||
IEnumerable<Objective> Objectives { get; }
|
IEnumerable<Objective> Objectives { get; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -8,6 +8,7 @@
|
|||||||
*/
|
*/
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using OpenRA.FileFormats;
|
using OpenRA.FileFormats;
|
||||||
@@ -24,7 +25,7 @@ namespace OpenRA.Mods.RA.Missions
|
|||||||
|
|
||||||
class Soviet01ClassicScript : IHasObjectives, IWorldLoaded, ITick
|
class Soviet01ClassicScript : IHasObjectives, IWorldLoaded, ITick
|
||||||
{
|
{
|
||||||
public event ObjectivesUpdatedEventHandler OnObjectivesUpdated = notify => { };
|
public event Action<bool> OnObjectivesUpdated = notify => { };
|
||||||
|
|
||||||
public IEnumerable<Objective> Objectives { get { return objectives.Values; } }
|
public IEnumerable<Objective> Objectives { get { return objectives.Values; } }
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user