示例#1
0
 void GeneratePulseHalo(ref Bounds blockBounds, int noPulses, Transform parent = null)
 {
     for (int i = 0; i < noPulses; ++i)
     {
         BlockHalo halo = InstantiateBlockHalo(_haloPrefabs.HaloPulseFadePrefab, ref blockBounds, parent);
         halo.Play(_haloConfig.BlockHaloPulseDelaySeconds * i);
     }
 }
示例#2
0
        BlockHalo InstantiateBlockHalo(BlockHalo blockHaloPrefab, ref Bounds blockBounds, Transform parent = null)
        {
            BlockHalo halo = Instantiate(blockHaloPrefab, parent, true);

            if (halo == null)
            {
                Debug.Log("TEST");
            }
            halo.SetSize(blockBounds);
            // set halo position to the bottom of provided block bounds (0.9f to prevent z fighting)
            halo.transform.position = blockBounds.center + Vector3.down * blockBounds.extents.y * 0.9f;
            return(halo);
        }
示例#3
0
        void GenerateFadeHalo(ref Bounds blockBounds, Transform parent = null)
        {
            BlockHalo halo = InstantiateBlockHalo(_haloPrefabs.HaloFadePrefab, ref blockBounds, parent);

            halo.Play();
        }