Ejemplo n.º 1
0
    public override void SetLOD(int lod)
    {
        EventInstance windEvent = TreeWindSfx.BeginTransfer(this.CurrentLodTransform);

        base.SetLOD(lod);
        TreeWindSfx.CompleteTransfer(this.CurrentLodTransform, windEvent);
    }
Ejemplo n.º 2
0
 private void State_Damaged()
 {
     FMOD.Studio.EventInstance windEvent = TreeWindSfx.BeginTransfer(this.lod.CurrentLodTransform);
     this.SpawnCutTree();
     if (this.lod.CurrentLodTransform)
     {
         UnityEngine.Object.Destroy(this.lod.CurrentLodTransform.gameObject);
         this.lod.CurrentLodTransform = null;
     }
     if (this.cut)
     {
         TreeWindSfx.CompleteTransfer(this.cut.transform, windEvent);
         this.ChunkUpdater1();
         this.ChunkUpdater2();
         this.ChunkUpdater3();
         this.ChunkUpdater4();
     }
 }
Ejemplo n.º 3
0
    public override void SetLOD(int lod)
    {
        bool          flag = this.currentLOD == 2 || lod == 2;
        EventInstance windEvent;

        if (flag)
        {
            windEvent = TreeWindSfx.BeginTransfer(this.CurrentLodTransform);
        }
        else
        {
            windEvent = null;
        }
        base.SetLOD(lod);
        if (flag)
        {
            TreeWindSfx.CompleteTransfer(this.CurrentLodTransform, windEvent);
        }
    }
Ejemplo n.º 4
0
    public void DoSpawnCutTree()
    {
        if (BoltNetwork.isRunning)
        {
            return;
        }
        EventInstance windEvent = TreeWindSfx.BeginTransfer(base.transform);

        this.Trunk = (GameObject)UnityEngine.Object.Instantiate(this.Trunk, base.transform.position, base.transform.rotation);
        if (!this.dontScaleTrunk)
        {
            this.Trunk.transform.localScale = base.transform.localScale;
        }
        TreeHealth component = this.Trunk.GetComponent <TreeHealth>();

        component.SetLodBase(this.LodTree);
        UnityEngine.Object.Destroy(base.gameObject);
        PrefabId log = BoltPrefabs.Log;

        TreeWindSfx.CompleteTransfer(this.Trunk.transform, windEvent);
    }