Exemplo n.º 1
0
    public void BurnOut()
    {
        if (!this.ReplIsOwner())
        {
            return;
        }
        for (int i = 0; i < this.m_CookingSlots.Length; i++)
        {
            this.m_CookingSlots[i].RemoveItem();
        }
        if (this.m_StonesPrefab != null)
        {
            UnityEngine.Object.Instantiate <GameObject>(this.m_StonesPrefab, base.transform.position, base.transform.rotation);
        }
        if (this.m_AshPrefab != null)
        {
            Item component = UnityEngine.Object.Instantiate <GameObject>(this.m_AshPrefab, base.transform.position, base.transform.rotation).GetComponent <Item>();
            if (component)
            {
                component.m_StaticPhx = true;
            }
        }
        GameObject prefab = GreenHellGame.Instance.GetPrefab("Charcoal");

        UnityEngine.Object.Instantiate <GameObject>(prefab, base.transform.position + Vector3.up * 0.1f + Vector3.forward * 0.08f, base.transform.rotation);
        UnityEngine.Object.Instantiate <GameObject>(prefab, base.transform.position + Vector3.up * 0.1f + Vector3.left * 0.08f, base.transform.rotation);
        UnityEngine.Object.Instantiate <GameObject>(prefab, base.transform.position + Vector3.up * 0.1f + Vector3.right * 0.08f, base.transform.rotation);
        HUDFirecamp.Get().UnregisterFirecamp(this);
        UnityEngine.Object.Destroy(base.gameObject);
    }
Exemplo n.º 2
0
 protected override void OnDestroy()
 {
     base.OnDestroy();
     if (HUDFirecamp.Get())
     {
         HUDFirecamp.Get().UnregisterFirecamp(this);
     }
     Firecamp.s_Firecamps.Remove(this);
 }
Exemplo n.º 3
0
 protected override void OnDestroy()
 {
     base.OnDestroy();
     if (HUDFirecamp.Get())
     {
         HUDFirecamp.Get().UnregisterFirecamp(this);
     }
     Firecamp.s_Firecamps.Remove(this);
     if (FirecampGroupsManager.Get())
     {
         FirecampGroupsManager.Get().OnDestroyFirecamp(this);
     }
     base.UnregisterConstantUpdateItem();
 }
Exemplo n.º 4
0
    private void BurnOut()
    {
        for (int i = 0; i < this.m_CookingSlots.Length; i++)
        {
            this.m_CookingSlots[i].RemoveItem();
        }
        if (this.m_AshPrefab != null)
        {
            UnityEngine.Object.Instantiate <GameObject>(this.m_AshPrefab, base.transform.position, base.transform.rotation);
        }
        GameObject prefab = GreenHellGame.Instance.GetPrefab("Charcoal");

        UnityEngine.Object.Instantiate <GameObject>(prefab, base.transform.position + Vector3.up * 0.1f + Vector3.forward * 0.08f, base.transform.rotation);
        UnityEngine.Object.Instantiate <GameObject>(prefab, base.transform.position + Vector3.up * 0.1f + Vector3.left * 0.08f, base.transform.rotation);
        UnityEngine.Object.Instantiate <GameObject>(prefab, base.transform.position + Vector3.up * 0.1f + Vector3.right * 0.08f, base.transform.rotation);
        HUDFirecamp.Get().UnregisterFirecamp(this);
        UnityEngine.Object.Destroy(base.gameObject);
    }
Exemplo n.º 5
0
    private void UpdateHUD()
    {
        if (this.m_NextUpdateHUDTime > Time.time)
        {
            return;
        }
        float num = Vector3.Distance(Player.Get().transform.position, base.transform.position);

        if (num <= HUDFirecamp.s_DistToActivate)
        {
            if (!this.m_HUDActive)
            {
                HUDFirecamp.Get().RegisterFirecamp(this);
                this.m_HUDActive = true;
            }
        }
        else if (this.m_HUDActive)
        {
            HUDFirecamp.Get().UnregisterFirecamp(this);
            this.m_HUDActive = false;
        }
        this.m_NextUpdateHUDTime = Time.time + CJTools.Math.GetProportionalClamp(0.1f, 5f, num, 5f, 50f);
    }