コード例 #1
0
ファイル: Log.cs プロジェクト: dreamanlan/CSharpGameFramework
 protected override void Load(Dsl.CallData callData)
 {
     int num = callData.GetParamNum();
     if (num > 0) {
         m_Format.InitFromDsl(callData.GetParam(0));
     }
     for (int i = 1; i < callData.GetParamNum(); ++i) {
         StoryValue val = new StoryValue();
         val.InitFromDsl(callData.GetParam(i));
         m_FormatArgs.Add(val);
     }
 }
コード例 #2
0
 protected override void Load(Dsl.CallData callData, SkillInstance instance)
 {
     if (callData.GetParamNum() > 0) {
         m_Type = callData.GetParamId(0);
     }
     if (callData.GetParamNum() > 1) {
         StartTime = long.Parse(callData.GetParamId(1));
     }
     if (callData.GetParamNum() > 2) {
         m_DeltaTime = long.Parse(callData.GetParamId(2));
     }
 }
コード例 #3
0
 protected override void Load(Dsl.CallData callData)
 {
     int num = callData.GetParamNum();
     if (num > 1) {
         m_Object.InitFromDsl(callData.GetParam(0));
         m_Method.InitFromDsl(callData.GetParam(1));
     }
     for (int i = 2; i < callData.GetParamNum(); ++i) {
         StoryValue val = new StoryValue();
         val.InitFromDsl(callData.GetParam(i));
         m_Args.Add(val);
     }
 }
コード例 #4
0
 protected override void Load(Dsl.CallData callData)
 {
     int num = callData.GetParamNum();
     if (num > 0) {
         m_Time.InitFromDsl(callData.GetParam(0));
     }
 }
コード例 #5
0
 protected override void Load(Dsl.CallData callData)
 {
     int num = callData.GetParamNum();
     if (num > 1) {
         m_TargetSceneId.InitFromDsl(callData.GetParam(0));
         m_ObjId.InitFromDsl(callData.GetParam(1));
     }
 }
コード例 #6
0
 private void LoadCondition(Dsl.CallData callData)
 {
     int num = callData.GetParamNum();
     if (num > 0 && callData.GetId() == "if") {
         m_HaveCondition = true;
         m_Condition.InitFromDsl(callData.GetParam(0));
     }
 }
コード例 #7
0
 protected override void Load(Dsl.CallData callData)
 {
     int num = callData.GetParamNum();
     if (num > 1) {
         m_ObjPath.InitFromDsl(callData.GetParam(0));
         m_ComponentType.InitFromDsl(callData.GetParam(1));
     }
 }
コード例 #8
0
 protected override void Load(Dsl.CallData callData)
 {
     int num = callData.GetParamNum();
     if (num > 1) {
         m_Key.InitFromDsl(callData.GetParam(0));
         m_Value.InitFromDsl(callData.GetParam(1));
     }
 }
コード例 #9
0
 protected override void Load(Dsl.CallData callData, SkillInstance instance)
 {
     if (callData.GetParamNum() >= 3) {
         StartTime = long.Parse(callData.GetParamId(0));
         m_RemainTime = long.Parse(callData.GetParamId(1));
         m_RotateSpeed = DslUtility.CalcVector3(callData.GetParam(2) as Dsl.CallData);
     }
 }
コード例 #10
0
 protected override void Load(Dsl.CallData callData, SkillInstance instance)
 {
     int num = callData.GetParamNum();
     if (num > 0) {
         StartTime = long.Parse(callData.GetParamId(0));
     } else {
         StartTime = 0;
     }
 }
コード例 #11
0
 protected override void Load(Dsl.CallData callData)
 {
     int num = callData.GetParamNum();
     for (int i = 0; i < num; ++i) {
         IStoryValue<string> val = new StoryValue<string>();
         val.InitFromDsl(callData.GetParam(i));
         m_MsgIds.Add(val);
     }
 }
コード例 #12
0
 protected override void Load(Dsl.CallData callData, SkillInstance instance)
 {
     int num = callData.GetParamNum();
     if (num >= 4) {
         StartTime = long.Parse(callData.GetParamId(0));
         m_RelativeOffset.X = float.Parse(callData.GetParamId(1));
         m_RelativeOffset.Y = float.Parse(callData.GetParamId(2));
         m_RelativeOffset.Z = float.Parse(callData.GetParamId(3));
     }
 }
コード例 #13
0
 protected override void Load(Dsl.CallData callData, SkillInstance instance)
 {
     int num = callData.GetParamNum();
     if (num >= 1) {
         StartTime = long.Parse(callData.GetParamId(0));
     }
     if (num >= 2) {
         m_RemainTime = long.Parse(callData.GetParamId(1));
     }
 }
コード例 #14
0
 protected override void Load(Dsl.CallData callData, SkillInstance instance )
 {
     int num = callData.GetParamNum();
     if (num >= 2) {
         StartTime = long.Parse(callData.GetParamId(0));
         m_Speed = float.Parse(callData.GetParamId(1));
     }
     if (num >= 3) {
         m_IsEffectSkillTime = bool.Parse(callData.GetParamId(2));
     }
 }
コード例 #15
0
 protected override void Load(Dsl.CallData callData, SkillInstance instance)
 {
     int num = callData.GetParamNum();
     if (num >= 4) {
         StartTime = long.Parse(callData.GetParamId(0));
         m_RelativeOffset.x = float.Parse(callData.GetParamId(1));
         m_RelativeOffset.y = float.Parse(callData.GetParamId(2));
         m_RelativeOffset.z = float.Parse(callData.GetParamId(3));
     }
     if (num >= 5) {
         m_IsForRoundMove = callData.GetParamId(4) == "true";
     }
 }
コード例 #16
0
 internal static Vector2 CalcVector2(Dsl.CallData callData)
 {
     if (null == callData || callData.GetId() != "vector2")
     return Vector2.Zero;
       int num = callData.GetParamNum();
       if (2 == num) {
     float x = float.Parse(callData.GetParamId(0));
     float y = float.Parse(callData.GetParamId(1));
     return new Vector2(x, y);
       } else {
     return Vector2.Zero;
       }
 }
コード例 #17
0
 internal static Vector3 CalcVector3(Dsl.CallData callData)
 {
     if (null == callData || callData.GetId() != "vector3")
     return Vector3.Zero;
       int num = callData.GetParamNum();
       if (3 == num) {
     float x = float.Parse(callData.GetParamId(0));
     float y = float.Parse(callData.GetParamId(1));
     float z = float.Parse(callData.GetParamId(2));
     return new Vector3(x, y, z);
       } else {
     return Vector3.Zero;
       }
 }
コード例 #18
0
 internal static Quaternion CalcEularRotation(Dsl.CallData callData)
 {
     if (null == callData || callData.GetId() != "eular")
     return Quaternion.Identity;
       int num = callData.GetParamNum();
       if (3 == num) {
     float x = float.Parse(callData.GetParamId(0));
     float y = float.Parse(callData.GetParamId(1));
     float z = float.Parse(callData.GetParamId(2));
     return Quaternion.CreateFromYawPitchRoll(x, y, z);
       } else {
     return Quaternion.Identity;
       }
 }
コード例 #19
0
 public static Vector3 CalcEularAngles(Dsl.CallData callData)
 {
     if (null == callData || callData.GetId() != "eular")
     return Vector3.Zero;
       int num = callData.GetParamNum();
       if (3 == num) {
     float x = float.Parse(callData.GetParamId(0));
     float y = float.Parse(callData.GetParamId(1));
     float z = float.Parse(callData.GetParamId(2));
     return new Vector3(x, y, z) * 59.29578f;
       } else {
     return Vector3.Zero;
       }
 }
コード例 #20
0
 protected override void Load(Dsl.CallData callData, SkillInstance instance)
 {
     int num = callData.GetParamNum();
     if (num >= 6) {
         StartTime = long.Parse(callData.GetParamId(0));
         m_RemainTime = long.Parse(callData.GetParamId(1));
         m_GoPath = callData.GetParamId(2);
         m_ShaderName = callData.GetParamId(3);
         m_StartColor = DslUtility.CalcColor(callData.GetParam(4) as Dsl.CallData);
         m_ChangeColor = DslUtility.CalcColor(callData.GetParam(5) as Dsl.CallData);
     }
     if (num >= 7) {
         m_ChangeTime = long.Parse(callData.GetParamId(6));
     }
 }
コード例 #21
0
 public static Quaternion CalcQuaternion(Dsl.CallData callData)
 {
     if (null == callData || callData.GetId() != "quaternion")
     return Quaternion.identity;
       int num = callData.GetParamNum();
       if (4 == num) {
     float x = float.Parse(callData.GetParamId(0));
     float y = float.Parse(callData.GetParamId(1));
     float z = float.Parse(callData.GetParamId(2));
     float w = float.Parse(callData.GetParamId(3));
     return new Quaternion(x, y, z, w);
       } else {
     return Quaternion.identity;
       }
 }
コード例 #22
0
 public static Color CalcColor(Dsl.CallData callData)
 {
     if (null == callData || callData.GetId() != "color")
     return Color.white;
       int num = callData.GetParamNum();
       if (4 == num) {
     float r = float.Parse(callData.GetParamId(0));
     float g = float.Parse(callData.GetParamId(1));
     float b = float.Parse(callData.GetParamId(2));
     float a = float.Parse(callData.GetParamId(3));
     return new Color(r, g, b, a);
       } else {
     return Color.white;
       }
 }
コード例 #23
0
 protected override void Load(Dsl.CallData callData, SkillInstance instance)
 {
     int num = callData.GetParamNum();
     if (num >= 1) {
         StartTime = long.Parse(callData.GetParamId(0));
     }
     if (num >= 9) {
         m_RelativeCenter.X = float.Parse(callData.GetParamId(1));
         m_RelativeCenter.Y = float.Parse(callData.GetParamId(2));
         m_RelativeCenter.Z = float.Parse(callData.GetParamId(3));
         m_Radius = float.Parse(callData.GetParamId(4));
         m_AngleOrLength = float.Parse(callData.GetParamId(5));
         m_AoeType = int.Parse(callData.GetParamId(6));
         m_MaxCount = int.Parse(callData.GetParamId(7));
         m_RelativeToTarget = callData.GetParamId(8) == "true";
     }
 }
コード例 #24
0
 public static Quaternion CalcEularRotation(Dsl.CallData callData)
 {
     if (null == callData || callData.GetId() != "eular")
     return Quaternion.identity;
       int num = callData.GetParamNum();
       if (3 == num) {
     float x = float.Parse(callData.GetParamId(0));
     float y = float.Parse(callData.GetParamId(1));
     float z = float.Parse(callData.GetParamId(2));
     try {
       return Quaternion.Euler(x, y, z);
     } catch {
       return Quaternion.identity;
     }
       } else {
     return Quaternion.identity;
       }
 }
コード例 #25
0
 protected override void Load(Dsl.CallData callData, SkillInstance instance)
 {
     if (callData.GetParamNum() >= 1) {
         StartTime = long.Parse(callData.GetParamId(0));
     }
 }
コード例 #26
0
 protected override void Load(Dsl.CallData callData, SkillInstance instance)
 {
     int num = callData.GetParamNum();
     if (num >= 1) {
         StartTime = long.Parse(callData.GetParamId(0));
     }
     if (num >= 2) {
         m_IsForRoundMove = callData.GetParamId(1)=="true";
     }
 }
コード例 #27
0
 protected override void Load(Dsl.CallData callData)
 {
     int num = callData.GetParamNum();
     if (num > 7) {
         m_Receiver.InitFromDsl(callData.GetParam(0));
         m_Title.InitFromDsl(callData.GetParam(1));
         m_Content.InitFromDsl(callData.GetParam(2));
         m_Sender.InitFromDsl(callData.GetParam(3));
         m_LevelDemand.InitFromDsl(callData.GetParam(4));
         m_ValidPeriod.InitFromDsl(callData.GetParam(5));
         m_Money.InitFromDsl(callData.GetParam(6));
         m_Gold.InitFromDsl(callData.GetParam(7));
     }
     for (int i = 8; i < callData.GetParamNum(); ++i) {
         StoryValue<int> val = new StoryValue<int>();
         val.InitFromDsl(callData.GetParam(i));
         m_MailItems.Add(val);
     }
 }
コード例 #28
0
 protected override void Load(Dsl.CallData callData)
 {
     int num = callData.GetParamNum();
     if (num > 2) {
         m_UserGuid.InitFromDsl(callData.GetParam(0));
         m_Key.InitFromDsl(callData.GetParam(1));
         m_Type.InitFromDsl(callData.GetParam(2));
     }
 }
コード例 #29
0
 protected override void Load(Dsl.CallData callData)
 {
     int num = callData.GetParamNum();
     if (num > 1) {
         m_UserGuid.InitFromDsl(callData.GetParam(0));
         m_MemberId.InitFromDsl(callData.GetParam(1));
     }
 }
コード例 #30
0
 protected override void Load(Dsl.CallData callData)
 {
     int num = callData.GetParamNum();
     if (num > 0) {
     }
 }