Пример #1
0
 protected virtual void ToggleLockOnGUI()
 {
     if (currentCharaInfo)
     {
         var targetManager = CameraTargetManager.GetTargetManager(currentCharaInfo);
         targetManager.showLockOnTargets = !targetManager.showLockOnTargets;
     }
 }
Пример #2
0
        protected virtual bool LockOn(string targetName, bool lockOnAnyway = false, bool resetOffset = true)
        {
            foreach (GameObject target in CameraTargetManager.GetTargetManager(currentCharaInfo).GetAllTargets())
            {
                if (target.name.Substring(3) == targetName.Substring(3))
                {
                    if (LockOn(target, resetOffset))
                    {
                        return(true);
                    }
                }
            }

            if (lockOnAnyway)
            {
                if (LockOn())
                {
                    return(true);
                }
            }

            return(false);
        }