예제 #1
0
    /// param:Id[对应到SkillSceneObjManager中的SoundEffect Id], pos[场景绝对位置]
    /// example:2,0 2 3
    public void Trigger_PlaySoundAtPosBySoundId(string param)
    {
#if SHOOTER_LOG
        Debug.Log("Trigger_PlaySoundAtPosBySoundId param:" + param);
#endif
        SkillSceneObjInfo sobjInfo  = new SkillSceneObjInfo(param);
        Vector3           targetPos = Vector3.zero;
        try {
            if (sobjInfo.paramOther.Count > 0)
            {
                targetPos = Script_Util.ToVector3(sobjInfo.paramOther[0]);
            }
            else
            {
                Debug.Log("Trigger_PlaySoundAtPosBySoundId miss pos");
                return;
            }
        } catch (System.Exception ex) {
            Debug.Log("Trigger_PlaySoundAtPosBySoundId pos convert error");
            return;
        }

        if (m_SceneObjMgr != null)
        {
            SkillSoundInfo soundInfo = m_SceneObjMgr.TryGetSkillSoundInfo(sobjInfo.Id);
            if (soundInfo != null)
            {
                TriggerImpl.PlaySoundAtPos(soundInfo, targetPos);
            }
        }
        else
        {
            Debug.Log("Trigger_PlaySoundAtPosBySoundId null");
        }
    }
예제 #2
0
    public Vector3 ExtractVector3(int index)
    {
        string ret = ExtractString(index);

        if (!string.IsNullOrEmpty(ret))
        {
            return(Script_Util.ToVector3(ret));
        }
        return(Vector3.zero);
    }
예제 #3
0
 public SkillMovementInfo(string param)
 {
     string[] result = Script_Util.SplitParam(param, 1);
     if (result != null)
     {
         Id               = Convert.ToInt32(result[0]);
         MoveTimeMax      = Convert.ToSingle(result[1]);
         ForwardInfo      = new NumericMovementInfo(result[2]);
         UpwardInfo       = new NumericMovementInfo(result[3]);
         SidewardInfo     = new NumericMovementInfo(result[4]);
         Gravity          = Script_Util.ToVector3(result[5]);
         IsAppendVelocity = Convert.ToBoolean(result[6]);
     }
     else
     {
         IsValid = false;
     }
 }
예제 #4
0
 public SkillEffectInfo(string param)
 {
     string[] result = Script_Util.SplitParam(param, 1);
     if (result != null)
     {
         Id = Convert.ToInt32(result[0]);
         if (result.Length >= 2)
         {
             EffectName = result[1];
         }
         if (result.Length >= 3)
         {
             EffectLiftTime = Convert.ToSingle(result[2]);
         }
         if (result.Length >= 4)
         {
             EffectPos = Script_Util.ToVector3(result[3]);
         }
         if (result.Length >= 5)
         {
             EffectRot = Script_Util.ToVector3(result[4]);
         }
         if (result.Length >= 6)
         {
             EffectParentBone = result[5];
         }
         if (result.Length >= 7)
         {
             EffectSoundId = Convert.ToInt32(result[6]);
         }
     }
     else
     {
         IsValid = false;
     }
 }