private void Start()
    {
        TerrainLoader.TerrainFullyLoaded += () => terrainFullyLoaded = true;

        EventReportsManager.Subscribe <BuildingDamageResult>(BuildingDamageHandler);
        EventReportsManager.Subscribe <DamagedBuildingsReport>(x => StartCoroutine(DamagedBuildingsReportHandler(x)));

        EventReportsManager.Send(new DamagedBuildingsRequest());
    }
示例#2
0
 // Use this for initialization
 void Start()
 {
     EventReportsManager.Subscribe <SetLocation>(SetLocationCallback);
     EventReportsManager.Subscribe <SetDestroy>(SetDestroyCallback);
     EventReportsManager.Subscribe <DamageResultLite>(SetDamageResultLiteCallback);
     EventReportsManager.Subscribe <SetRestore>(SetRestoreCallback);
     EventReportsManager.Subscribe <SetPosture>(SetPostureCallback);
     //delete and put a reference in the inspector if this script is only used for the infantry.
     WalkingModel = PublishedEntity.GetComponent <WalkingModel>();
 }
示例#3
0
        protected virtual void Start()
        {
            EventReportsManager EventReportsManager = EventReportsManager.Instance;

            EventReportsManager.Subscribe <SetLocation>(SetLocationHandler);
            EventReportsManager.Subscribe <SetDestroy>(SetDestroyHandler);
            EventReportsManager.Subscribe <SetAmmunition>(SetAmmoHandler);

            EventReportsManager.Subscribe <SetRestore>(SetRestoreHandler);
            EventReportsManager.Subscribe <DamageResultLite>(DamageResultLiteHandler);
        }
        private void Start()
        {
            damageMessages = new DamageMessages();

            if (LoadJSONData)
            {
                JSONDataSaver.Read <DamageMessages>(damageMessages, FileName);
                PublishReport();
            }

            EventReportsManager.Subscribe <BuildingDamageResult>(BuildingDamageHandler);
            EventReportsManager.Subscribe <DamagedBuildingsRequest>(RequestReceivedHandler);
        }
    IEnumerator Start()
    {
        for (int i = 0; i < UnityEngine.SceneManagement.SceneManager.sceneCount; i++)
        {
            UnityEngine.SceneManagement.Scene scene = UnityEngine.SceneManagement.SceneManager.GetSceneAt(i);
            if (scene.name == "Infantry")
            {
                DeployedInInfantryScene = true;
            }
        }
        while (!gameObject.scene.isLoaded)
        {
            yield return(null);
        }
        yield return(null);

        ExerciseConnection  = FindObjectOfType <ExerciseConnection>();
        EventReportsManager = ExerciseConnection.GetComponent <EventReportsManager>();
        yield return(new WaitForSeconds(0.5f));

        if (EventReportsManager != null)
        {
            EventReportsManager.Subscribe <DeployFoldDevice>(DeployFoldDeviceCallback);
        }

        ReflectedEntities = ExerciseConnection.GetComponent <ReflectedEntities>();

        StartCoroutine(FindOperatorEntityId());
    }
示例#6
0
 void Start()
 {
     tenkokuObject            = (TenkokuModule)FindObjectOfType(typeof(TenkokuModule));
     tenkokuObject.yearValue  = Year;
     tenkokuObject.monthValue = Month;
     tenkokuObject.dayValue   = Day;
     EventReportsManager.Subscribe <EnvironmentState>(EnvironmentStateCallback);
 }
 protected override void Awake()
 {
     base.Awake();
     entitiesIdsToIgnore    = new HashSet <EntityId>();
     checkedEntityIds       = new HashSet <EntityId>();
     reflectedEntitiesCache = new Dictionary <EntityId, ReflectedEntityCache>();
     if (null == EventReportsManager)
     {
         EventReportsManager = GetComponent <EventReportsManager>();
     }
     EventReportsManager.Subscribe <EventReports.InfantryModelOptions>(ApplyDeviceToInfantry);
 }
示例#8
0
 // Use this for initialization
 void Start()
 {
     EventReportsManager.Subscribe <EnvironmentState>(EnvironmentStateCallback);
 }
 void Start()
 {
     EventReportsManager.Subscribe <SetLocation>(Set);
 }