예제 #1
0
            static void AddSelectionIndicator(FlashLight flashlight)
            {
                try
                {
                    targetingFire = targetingFireCompositeEffect?.CreateOrFindUnsafe();
                    targetingFireCompositeEffect?.RefreshIfNecessary(targetingFire);
                    if (targetingFire == null)
                    {
                        Log.Error($"targetingFire is NULL!!!");
                        return;
                    }

                    targetingFire.transform.SetParent(flashlight.gameObject.transform);
                    targetingFire.transform.localPosition = new Vector3(0, 0, 0);
                }
                catch (Exception ex)
                {
                    Log.Exception(ex);
                }
            }
예제 #2
0
 protected void CreateTargetSelector(CompositeEffect compositeEffect)
 {
     try
     {
         targetingPrefab = compositeEffect?.CreateOrFindUnsafe();
         compositeEffect?.RefreshIfNecessary(targetingPrefab);
         if (targetingPrefab == null)
         {
             Talespire.Log.Error($"targetingPrefab is NULL!!!");
         }
         else
         {
             targetingPrefab.transform.SetParent(Transform);
             targetingPrefab.transform.localPosition = new Vector3(0, offsetY, 0);
         }
     }
     catch (Exception ex)
     {
         Talespire.Log.Exception(ex);
     }
 }