protected override bool Run() { GameObject objectToBurn = base.GetSelectedObject() as GameObject; FireManager.AddFire(objectToBurn); return(true); }
/// <summary> /// Initialise a level /// </summary> /// <param name="onWin">Function to call when a player wins (parameter is winning player index)</param> /// <param name="onTie">Function to call when there's a tie</param> public Level(Action<int> onWin, Action onTie) { this.onWin = onWin; this.onTie = onTie; aesthetics = new LevelAesthetics(); tileObjectManager = new TileObjectManager(this); fireManager = new FireManager(tileObjectManager); solidArea = new bool[GlobalGameData.gridSizeX, GlobalGameData.gridSizeY]; gridNodeMap = new GridNodeMap(); playerToController = new Dictionary<int, int>(); players = new Player[4]; //Initialise players to the gridnodemap, with their index, and the bomb create function for (int i = 0; i < 4; ++i) { players[i] = new Player(gridNodeMap, i, tileObjectManager.CreateBomb); } playerInputControllers = new PlayerInputController[4]; //Initialise player input controllers to the players for (int i = 0; i < 4; ++i) { playerInputControllers[i] = new PlayerInputController(players[i]); } floatingAnimationManager = new FloatingAnimationManager(); }
void Start() { movementManager = GetComponent <MovementManager>(); fireManager = GetComponent <FireManager>(); meleeManager = GetComponent <MeleeManager>(); gunDatsuManager = GetComponent <GunDatsuManager>(); }
// Use this for initialization void Start() { animatorController = this.GetComponent <Animator>(); firegun.SetActive(false); gunManager = gun.GetComponent <GunManager>(); fireManager = firegun.GetComponent <FireManager>(); }
// Start is called before the first frame update void Start() { if (instance == null) { instance = this; } }
// Start is called before the first frame update void Start() { fireManager = FindObjectOfType <FireManager>(); rb = GetComponent <Rigidbody>(); rb.AddForce(Vector3.forward * fireManager.speed); Debug.LogWarning(Vector3.forward); Destroy(gameObject, 2); }
void Awake() { i = this; library = FindObjectOfType <Library>(); gridManager = FindObjectOfType <GridManager>(); fireManager = FindObjectOfType <FireManager>(); loadSaverManager = FindObjectOfType <LoaderSaverManager>(); }
// Start is called before the first frame update void Start() { instance = this; spawnObservable = Observable.Interval(TimeSpan.FromSeconds(interval)).Subscribe(_ => { Spawn(); }).AddTo(this); }
public void StartBurning(Vector3Int position, TileData data, FireManager fm) { this.position = position; this.data = data; fireManager = fm; burnTimeCounter = data.burnTime; spreadIntervallCounter = data.spreadIntervall; }
public override void start() { listaParticulas = new List <FireParticle>(); random = new Random(); texturaFogo = Game1.Self.Content.Load <Texture2D>("FOGO/penis_borra"); FireManager.Initialize(); sceneName = "Little Inferno's Fire"; }
void IPooledObject.OnObjectSpawnBurn(Vector3Int tilePosition, TileData data, FireManager fm) { this.position = tilePosition; this.data = data; fireManager = fm; burnTimeCounter = data.burnTime; spreadIntervalCounter = data.spreadInterval; }
// Start is called before the first frame update void Start() { //Primeiro float Tempo que vai demorar pra nascer o bicho no inicio do jogo //Segundo float de quanto em quanto tempo vai demorar pra nascer InvokeRepeating("SpawnEnemies", 4f, 2f); inst = this; }
void Awake() { invRef = FindObjectOfType <Inventory>(); dayRef = FindObjectOfType <DayNightCycle>(); player = FindObjectOfType <PlayerController>(); fire = FindObjectOfType <FireManager>(); uiText[0].text = "DAYS: " + dayRef.GetDaysPassed().ToString(); uiText[1].text = "0" + dayRef.GetHour() + "0" + dayRef.GetMinute().ToString(); }
void Start() { _animator = GetComponent <Animator>(); _characterController = GetComponent <CharacterController>(); StartCoroutine(UpdateVelocity()); _cameraTransform = Camera.main.transform; currentSpeed = walkSpeed; _fire = GetComponent <FireManager>(); }
private void setReferencesAndInitializeValues() { try{ audioManager = AudioManager.getInstance(); fireManager = gameObject.GetComponent <FireManager>(); initialHealth = health; }catch (System.Exception e) { Debug.LogWarning("IREI RETORNAR, POIS UMA EXCEÇÃO FOI ENCONTRADA: " + e); return; } }
private void Awake() { if (manager == null) { manager = this; } else { Destroy(gameObject); } }
private void Awake() { if (Instance == null) { Instance = this; } else { Destroy(gameObject); } }
void Awake() { health.SetValues(); player = FindObjectOfType <PlayerController>(); fire = FindObjectOfType <FireManager>(); turret = FindObjectOfType <BaseTurret>(); targetManager = FindObjectOfType <EnemyTargetManager>(); agent = GetComponent <NavMeshAgent>(); myPos = transform; agent.speed = moveSpeed; }
private void InitSingleton() { if (instance != null && instance != this) { Destroy(gameObject); } else { instance = this; } }
private void Awake() { if (Instance == null) { Instance = this; } else if (Instance != this) { Destroy(gameObject); } DontDestroyOnLoad(gameObject); }
public override bool Run() { try { FireManager.AddFire(Hit.mPoint, true /*false*/); } catch (Exception exception) { Common.Exception(Actor, Target, exception); } return(true); }
void Awake() { if (Instance == null) { Instance = this; if (firePrefab == null) { Debug.LogError("Unable to start Fire Manager: No fire prefab is set."); } } else { Destroy (gameObject); } }
void Load() { _manager = FindObjectOfType <FireManager>(); if (_manager == null) { Debug.LogError("manager no encontrado"); } _post = GetComponent <PostProcessingBehaviour>(); if (_post == null) { Debug.LogError("post no encontrado"); } }
public void Spread() { block = GetComponent <Block>(); FireManager.Spread(this); if (block.states.ContainsKey(State.Damaged)) { block.Destroy(); } else { block.AddState(State.Damaged); Remove(); } }
void ISendToInternal.onRead(byte[] data) { List <Sim> sims = Household.ActiveHousehold.Sims; foreach (Sim poorSoul in sims) { FireManager.AddFire(poorSoul); } GameObject[] objects = Household.ActiveHousehold.LotHome.GetObjects <GameObject>(); foreach (GameObject go in objects) { FireManager.AddFire(go); } }
public async Task <FireManager> InitializeFire() { var fire = new Fire(_position) { ExplosionOnStart = _explosionOnStart, FlameSpawnDelay = _flameSpawnDelay, IsGasFire = _isGasFire }; var fireManager = new FireManager(fire); await fireManager.Initialize(); Console.WriteLine($"Fire {fire.Id} spawned"); return(fireManager); }
void Awake() { if (Instance == null) { Instance = this; if (firePrefab == null) { Debug.LogError("Unable to start Fire Manager: No fire prefab is set."); } } else { Destroy(gameObject); } }
private static void Postfix(Panel_FireStart __instance) { Campfire m_CampFireInstance = AccessTools.Field(typeof(Panel_FireStart), "m_CampFireInstance").GetValue(__instance) as Campfire; if (m_CampFireInstance == null) { return; } Fire fire = m_CampFireInstance.GetComponent <Fire>(); if (fire == null) { return; } FireManager.DestroyFireObject(fire); }
public void Init(Transform scene, FireManager fireManager, Vector3 target) { this.scene = scene; this.target = target; this.fireManager = fireManager; fireManager.AddFire(this); float angle = Vector2.Angle(spitSpawn - this.target, spitSpawn); if (target.x > 0) { angle *= -1; } transform.position = spitSpawn; spitFire.transform.rotation = Quaternion.Euler(new Vector3(0, 0, angle)); burningFire.SetActive(false); timeline.Play(); }
// Token: 0x0600A7E4 RID: 42980 RVA: 0x002FB840 File Offset: 0x002FA840 private void EventCallbackCreateAshPile(StateMachineClient sender, IEvent evt) { this.mAshPile = (GlobalFunctions.CreateObjectOutOfWorld("AshPile") as AshPile); if (this.Actor.SimDescription.IsMummy || this.Actor.SimDescription.DeathStyle == SimDescription.DeathType.MummyCurse) { this.mAshPile.SetMaterial("mummy"); } this.mAshPile.AddToWorld(); this.mAshPile.SetPosition(this.Actor.Position); this.mAshPile.SetTooltipText(this.Actor.SimDescription.FirstName + " " + this.Actor.SimDescription.LastName); LotLocation invalid = LotLocation.Invalid; World.GetLotLocation(this.mAshPile.Position, ref invalid); FireManager.BurnTile(this.mAshPile.LotCurrent.LotId, invalid); SimDescription.DeathType deathStyle = this.Actor.SimDescription.DeathStyle; float fadeTime = (deathStyle == SimDescription.DeathType.MummyCurse || deathStyle == SimDescription.DeathType.Thirst) ? 1.2f : GameObject.kGlobalObjectFadeTime; this.Actor.FadeOut(false, false, fadeTime); }
void Load() { _avatarVR = GameObject.Find("AvatarVR").transform; if (_avatarVR == null) { Debug.LogError("AvatarVR no encontrado"); } _data = FindObjectOfType <PersistentData>(); if (_data == null) { Debug.LogError("persisten data no encontrado"); } _manager = GetComponent <FireManager>(); if (_manager == null) { Debug.LogError("_manager no encontrado"); } }
public override void update(GameTime gameTime) { if (Controller.MouseLeftDown()) { FireParticle particula = new FireParticle(texturaFogo, random); particula.x = random.Next(Mouse.GetState().X - 5, Mouse.GetState().X + 5); particula.y = random.Next(Mouse.GetState().Y - 5, Mouse.GetState().Y + 5); listaParticulas.Add(particula); FireManager.AddFireParticle(particula); } FireParticle particula2 = new FireParticle(texturaFogo, random); particula2.x = random.Next(400 - 5, 400 + 5); particula2.y = random.Next(400 - 5, 400 + 5); listaParticulas.Add(particula2); FireManager.AddFireParticle(particula2); FireManager.Update(gameTime); }
// Use this for initialization void Start() { // If a tag was not set in the editor then fallback to slower why of finding the object try { GameObject manager = GameObject.FindWithTag("Fire"); if (manager != null) { FireManager fireManager = manager.GetComponent <FireManager>(); if (fireManager != null) { m_extinguishThreshold = m_fuel * fireManager.visualExtinguishThreshold; m_combustionRateValue = fireManager.nodeCombustionRate; } else { m_extinguishThreshold = m_fuel; m_combustionRateValue = 1.0f; } } } catch { // Get the terrain from the fire manager FireManager fireManager = FindObjectOfType <FireManager>(); if (fireManager != null) { m_extinguishThreshold = m_fuel * fireManager.visualExtinguishThreshold; m_combustionRateValue = fireManager.nodeCombustionRate; } else { m_extinguishThreshold = m_fuel; m_combustionRateValue = 1.0f; } } }
// Use this for initialization void Start() { fm = GetComponent<FireManager> (); }
// Use this for initialization public override void Start() { Instance = this; base.Start(); }