static public int constructor(IntPtr l)
 {
     try {
         TableConfig.Formation.PosDir o;
         System.Collections.Generic.List <System.Single> a1;
         checkType(l, 2, out a1);
         System.Single a2;
         checkType(l, 3, out a2);
         o = new TableConfig.Formation.PosDir(a1, a2);
         pushValue(l, true);
         pushValue(l, o);
         return(2);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
Exemplo n.º 2
0
    private ScriptRuntime.Vector3 GetHomePos(int formationIndex, EntityInfo leader)
    {
        ScriptRuntime.Vector3 pos;
        int id = GetFormationId(leader);

        TableConfig.Formation formation = TableConfig.FormationProvider.Instance.GetFormation(id);
        if (null != formation)
        {
            TableConfig.Formation.PosDir posDir = formation.GetPosDir(formationIndex);
            float dir;
            pos = posDir.CalcPosDir(leader.GetMovementStateInfo().TargetPosition, leader.GetMovementStateInfo().GetFaceDir(), out dir);
        }
        else
        {
            pos = ScriptRuntime.Vector3.Zero;
        }
        return(pos);
    }