예제 #1
0
 //public override void AddCaster(CasterItem caster)
 //{
 //    base.AddCaster(caster);
 //}
 public override void RemoveCaster(CasterItem caster)
 {
     base.RemoveCaster(caster);
     if (lastPoses.ContainsKey(caster.idx))
     {
         lastPoses.Remove(caster.idx);
     }
 }
예제 #2
0
 public virtual void RemoveCaster(CasterItem caster)
 {
     if (wldVertex.ContainsKey(caster.idx))
     {
         wldVertex.Remove(caster.idx);
         tris.Remove(caster.idx);
         casters.Remove(caster);
         dirty = true;
     }
 }
예제 #3
0
        void RefreshCaster(CasterItem caster)
        {
            int       count = caster.mesh.vertexCount;
            Transform tr    = caster.tr;

            Vector3[] vertex    = caster.mesh.vertices;
            Vector3[] newVertex = wldVertex[caster.idx];
            for (int i = 0; i < count; i++)
            {
                newVertex[i] = tr.localToWorldMatrix.MultiplyPoint3x4(vertex[i]);
            }
        }
예제 #4
0
 public virtual void AddCaster(CasterItem caster)
 {
     if (wldVertex.ContainsKey(caster.idx))
     {
         return;
     }
     else
     {
         TransformCaster(caster);
         casters.Add(caster);
         dirty = true;
     }
 }
예제 #5
0
        protected virtual void TransformCaster(CasterItem caster)
        {
            int       count = caster.mesh.vertexCount;
            Transform tr    = caster.tr;

            Vector3[] vertex    = caster.mesh.vertices;
            Vector3[] newVertex = new Vector3[count];
            for (int i = 0; i < count; i++)
            {
                newVertex[i] = tr.localToWorldMatrix.MultiplyPoint3x4(vertex[i]);
            }
            wldVertex.Add(caster.idx, newVertex);
            tris.Add(caster.idx, caster.mesh.triangles);
        }
예제 #6
0
 public static void RemoveCaster(CasterItem caster)
 {
     if (One == null)
     {
         return;
     }
     if (caster.kind == CasterKind.dynamicCaster)
     {
         One.dynamicCaster.RemoveCaster(caster);
     }
     else if (caster.kind == CasterKind.staticCaster)
     {
         One.staticCaster.RemoveCaster(caster);
     }
 }
예제 #7
0
 protected override void TransformCaster(CasterItem caster)
 {
     base.TransformCaster(caster);
     lastPoses.Add(caster.idx, caster.tr.position);
 }