Example #1
0
 //override
 public override int defenseAtk( Vector6 damage ,   GameObject atkerObj  )
 {
     int dmg;
     dmg = base.defenseAtk(damage, atkerObj);
     //		super.checkAtkerDefense(atkerObj);
     return dmg;
 }
Example #2
0
 //override
 public override int defenseAtk( Vector6 damage ,   GameObject atkerObj  )
 {
     int dmg =0;
     //		dmg = base.defenseAtk(0, atkerObj);
     base.checkAtkerDefense(atkerObj);
     return dmg;
 }
Example #3
0
        public int WriteVec6(Vector6 vec)
        {
            Vector6 v = vec;

            LittleRevBytes(&v, sizeof(float), sizeof(Vector6) / sizeof(float));
            return(Write((byte *)&v, sizeof(Vector6)));
        }
Example #4
0
    public void Init(int time_, float damage_, Character c, float attackSpeed_)
    {
        isEnemy = (c is Ch2_Nebula)? true : false;
        time = time_;
        damage = damage_;
        chAtk = c.realAtk;
        if(c is Ch2_Nebula){
            Ch2_Nebula nebula = c as Ch2_Nebula;
            attackSpeed = nebula.showSkill10APassive(attackSpeed_);
        }else if(c is Nebula){
            Nebula nebula = c as Nebula;
            if(nebula.canShowNebulaPassive("NEBULA10A")){
                attackSpeed = nebula.showSkill10APassive(attackSpeed_);
            }else{
                attackSpeed = attackSpeed_;
            }
        }
        //attackSpeed = attackSpeed_;
        Invoke("DestroyMySelf", time);
        isTowardRight = model.transform.localScale.x > 0;

        if (null == bulletPrefab){
            bulletPrefab = Resources.Load("eft/Nebula/SkillEft_NEBULA5A_Bullet");
        }
    }
Example #5
0
 public override int defenseAtk( Vector6 damage ,   GameObject atkerObj  )
 {
     if(canShowGrootPassive("GROOT10A")){
         damage = showGroot10APassive(damage);
     }
     return base.defenseAtk(damage, atkerObj);
 }
    void Forward(Vector6 jointsDeg, ref Matrix4x4[] m)
    {
        Vector6 c = new Vector6();
        Vector6 s = new Vector6();

        for (int i = 0; i < 6; i++)
        {
            var jointRad = DegreeToRadian(jointsDeg[i], i);
            c[i] = Cos(jointRad);
            s[i] = Sin(jointRad);
        }

        var a = _a;
        var d = _d;

        var m0 = new Matrix4x4(new Vector4(c[0], 0, s[0], a[0] * c[0]), new Vector4(s[0], 0, -c[0], a[0] * s[0]), new Vector4(0, 1, 0, d[0]), new Vector4(0, 0, 0, 1)).transpose;
        var m1 = new Matrix4x4(new Vector4(c[1], -s[1], 0, a[1] * c[1]), new Vector4(s[1], c[1], 0, a[1] * s[1]), new Vector4(0, 0, 1, 0), new Vector4(0, 0, 0, 1)).transpose;
        var m2 = new Matrix4x4(new Vector4(c[2], 0, s[2], a[2] * c[2]), new Vector4(s[2], 0, -c[2], a[2] * s[2]), new Vector4(0, 1, 0, 0), new Vector4(0, 0, 0, 1)).transpose;
        var m3 = new Matrix4x4(new Vector4(c[3], 0, -s[3], 0), new Vector4(s[3], 0, c[3], 0), new Vector4(0, -1, 0, d[3]), new Vector4(0, 0, 0, 1)).transpose;
        var m4 = new Matrix4x4(new Vector4(c[4], 0, s[4], 0), new Vector4(s[4], 0, -c[4], 0), new Vector4(0, 1, 0, 0), new Vector4(0, 0, 0, 1)).transpose;
        var m5 = new Matrix4x4(new Vector4(c[5], -s[5], 0, 0), new Vector4(s[5], c[5], 0, 0), new Vector4(0, 0, 1, d[5]), new Vector4(0, 0, 0, 1)).transpose;

        if (m == null)
        {
            m = new Matrix4x4[7];
        }

        m[0] = Matrix4x4.identity;
        m[1] = m[0] * m0;
        m[2] = m[1] * m1;
        m[3] = m[2] * m2;
        m[4] = m[3] * m3;
        m[5] = m[4] * m4;
        m[6] = m[5] * m5;
    }
Example #7
0
    //get attacked
    public override int defenseAtk( Vector6 damage ,   GameObject atkerObj  )
    {
        int dmg;
        Run();

        dmg = base.defenseAtk(damage, atkerObj);
        return dmg;
    }
Example #8
0
 public static float Distance(Vector6 a, Vector6 b)
 {
     return((float)Math.Sqrt(((b.largeRow - a.largeRow) * (b.largeRow - a.largeRow)) +
                             ((b.largeColumn - a.largeColumn) * (b.largeColumn - a.largeColumn)) +
                             ((b.smallRow - a.smallRow) * (b.smallRow - a.smallRow)) +
                             ((b.smallColumn - a.smallColumn) * (b.smallColumn - a.smallColumn)) +
                             ((b.wonBy - a.wonBy) * (b.wonBy - a.wonBy))));
 }
 private Robot(Vector6 a, Vector6 d, Matrix4x4 @base, Mesh[] joints, Mesh tool)
 {
     _a      = a;
     _d      = d;
     _base   = @base;
     _joints = joints;
     _tool   = tool;
     Forward(new Vector6(0, 0, 0, 0, 0, 0), ref _init);
 }
Example #10
0
        public int ReadVec6(out Vector6 vec)
        {
            Vector6 r; var buf = (byte *)&r;
            var     result = Read(buf, sizeof(Vector6));

            LittleRevBytes(buf, sizeof(float), sizeof(Vector6) / sizeof(float));
            vec = r;
            return(result);
        }
    public static Robot IRB1600(IList <float> origin)
    {
        var a      = new Vector6(150, 700, 0, 0, 0, 0);
        var d      = new Vector6(486.5f, 0, 0, 600, 0, 65);
        var @base  = Base(origin);
        var joints = GetMeshes("IRB1600");
        var tool   = GetMeshes("Gripper")[0];

        return(new Robot(a, d, @base, joints, tool));
    }
Example #12
0
 public static float Magnitude(Vector6 a)
 {
     return(Mathf.Sqrt(
                Mathf.Pow(a.largeRow, 2) +
                Mathf.Pow(a.largeColumn, 2) +
                Mathf.Pow(a.smallRow, 2) +
                Mathf.Pow(a.smallColumn, 2) +
                Mathf.Pow(a.wonBy, 2) +
                Mathf.Pow(a.valid, 2)));
 }
Example #13
0
 public static Vector6 Lerp(Vector6 from, Vector6 to, float t)
 {
     return(new Vector6(
                Mathf.Lerp(from.largeRow, to.largeRow, t),
                Mathf.Lerp(from.largeColumn, to.largeColumn, t),
                Mathf.Lerp(from.smallRow, to.smallRow, t),
                Mathf.Lerp(from.smallColumn, to.smallColumn, t),
                Mathf.Lerp(from.wonBy, to.wonBy, t),
                Mathf.Lerp(from.valid, to.valid, t)));
 }
Example #14
0
 public Vector6 Add(Vector6 v6)
 {
     this.PHY += v6.PHY;
     this.IMP += v6.IMP;
     this.PSY += v6.PSY;
     this.EXP += v6.EXP;
     this.ENG += v6.ENG;
     this.MAG += v6.MAG;
     return this;
 }
Example #15
0
 public override int defenseAtk( Vector6 damage ,   GameObject atkerObj  )
 {
     HeroData heroData = data as HeroData;
     if( heroData.getPSkillByID("MARINE5") != null){
         if(StaticData.computeChance(10,100)){
             Enemy enemy = atkerObj.GetComponent<Enemy>();
             enemy.fearWithSeconds();
         }
     }
     return base.defenseAtk(damage, atkerObj);
 }
Example #16
0
    public static Vector6 createWithStaticDefXml(XmlNode dataNode, string type)
    {
        Vector6 v6 = new Vector6();
        v6.PHY = float.Parse(dataNode.Attributes [type + "_PHY"].Value);
        v6.IMP = float.Parse(dataNode.Attributes [type + "_IMP"].Value);
        v6.PSY = float.Parse(dataNode.Attributes [type + "_PSY"].Value);
        v6.EXP = float.Parse(dataNode.Attributes [type + "_EXP"].Value);
        v6.ENG = float.Parse(dataNode.Attributes [type + "_ENG"].Value);
        v6.MAG = float.Parse(dataNode.Attributes [type + "_MAG"].Value);

        return v6;
    }
Example #17
0
    public override int defenseAtk( Vector6 damage ,   GameObject atkerObj  )
    {
        //			if(StaticData.computeChance(5,100)){
        //				HeroData heroData = data as HeroData;
        //				for(int i=0; i<heroData.skillListBattle.Count; i++){
        //					SkillData tempSKD = heroData.skillListBattle[i] as SkillData;
        //					tempSKD.reset();
        //				}
        //			}

        return base.defenseAtk(damage, atkerObj);
    }
Example #18
0
    public static Vector6 Normalize(Vector6 a)
    {
        float Mag = Vector6.Magnitude(a);

        return(new Vector6(
                   a.largeRow / Mag,
                   a.largeColumn / Mag,
                   a.smallRow / Mag,
                   a.smallColumn / Mag,
                   a.wonBy / Mag,
                   a.valid / Mag));
    }
Example #19
0
 public static Vector6 Transform(ref Vector6 value1, ref Matrix6x6 value2)
 {
     return(new Vector6
     {
         X = value2.M11 * value1.X + value2.M12 * value1.Y + value2.M13 * value1.Z + value2.M14 * value1.W + value2.M15 * value1.V + value2.M16 * value1.U,
         Y = value2.M21 * value1.X + value2.M22 * value1.Y + value2.M23 * value1.Z + value2.M24 * value1.W + value2.M25 * value1.V + value2.M26 * value1.U,
         Z = value2.M31 * value1.X + value2.M32 * value1.Y + value2.M33 * value1.Z + value2.M34 * value1.W + value2.M35 * value1.V + value2.M36 * value1.U,
         W = value2.M41 * value1.X + value2.M42 * value1.Y + value2.M43 * value1.Z + value2.M44 * value1.W + value2.M45 * value1.V + value2.M46 * value1.U,
         V = value2.M51 * value1.X + value2.M52 * value1.Y + value2.M53 * value1.Z + value2.M54 * value1.W + value2.M55 * value1.V + value2.M56 * value1.U,
         U = value2.M61 * value1.X + value2.M62 * value1.Y + value2.M63 * value1.Z + value2.M64 * value1.W + value2.M65 * value1.V + value2.M66 * value1.U,
     });
 }
Example #20
0
    // public override bool getIsDead (){
    // return isDead;
    // }
    public override int defenseAtk( Vector6 damage ,   GameObject atkerObj  )
    {
        if(isDead)return 0;
        defensAtkNum++;
        if(defensAtkNum < defensAtk.Count)
        {
            playAnim(defensAtk[defensAtkNum].ToString());
        //			print(defensAtk[defensAtkNum]);
        }else{}

        return 0;
    }
Example #21
0
    public static Vector6 createWithHashtable(Hashtable jsonHash, string type)
    {
        Vector6 v6 = new Vector6();
        if(jsonHash.Contains(type+"_PHY")) v6.PHY = float.Parse(jsonHash[type + "_PHY"].ToString());
        if(jsonHash.Contains(type+"_IMP")) v6.IMP = float.Parse(jsonHash[type + "_IMP"].ToString());
        if(jsonHash.Contains(type+"_PSY")) v6.PSY = float.Parse(jsonHash[type + "_PSY"].ToString());
        if(jsonHash.Contains(type+"_EXP")) v6.EXP = float.Parse(jsonHash[type + "_EXP"].ToString());
        if(jsonHash.Contains(type+"_ENG")) v6.ENG = float.Parse(jsonHash[type + "_ENG"].ToString());
        if(jsonHash.Contains(type+"_MAG")) v6.MAG = float.Parse(jsonHash[type + "_MAG"].ToString());

        return v6;
    }
Example #22
0
 public void showGroot20BPassive(Vector6 damage,GameObject atkerObj)
 {
     SkillDef skillDef = SkillLib.instance.getSkillDefBySkillID("GROOT20B");
     float tempAtk = ((Effect)skillDef.passiveEffectTable["atk_PHY"]).num;
     Vector6 tempDmage = damage.clone();
     tempDmage.Multip(tempAtk/100f);
     Character enemy = atkerObj.GetComponent<Character>();
     if(enemy != null){
         int dam = enemy.getDamageValue(tempDmage);
         enemy.realDamage(dam);
     }
 }
Example #23
0
        private unsafe void ProcessDelaySurround(ref DelayState state, Span <IntPtr> outputBuffers, ReadOnlySpan <IntPtr> inputBuffers, uint sampleCount)
        {
            const ushort channelCount = 6;

            float feedbackGain           = FixedPointHelper.ToFloat(Parameter.FeedbackGain, FixedPointPrecision);
            float delayFeedbackBaseGain  = state.DelayFeedbackBaseGain;
            float delayFeedbackCrossGain = state.DelayFeedbackCrossGain;
            float inGain  = FixedPointHelper.ToFloat(Parameter.InGain, FixedPointPrecision);
            float dryGain = FixedPointHelper.ToFloat(Parameter.DryGain, FixedPointPrecision);
            float outGain = FixedPointHelper.ToFloat(Parameter.OutGain, FixedPointPrecision);

            Matrix6x6 delayFeedback = new Matrix6x6(delayFeedbackBaseGain, 0.0f, 0.0f, 0.0f, delayFeedbackCrossGain, delayFeedbackCrossGain,
                                                    0.0f, delayFeedbackBaseGain, 0.0f, delayFeedbackCrossGain, delayFeedbackCrossGain, 0.0f,
                                                    delayFeedbackCrossGain, 0.0f, delayFeedbackBaseGain, delayFeedbackCrossGain, 0.0f, 0.0f,
                                                    0.0f, delayFeedbackCrossGain, delayFeedbackCrossGain, delayFeedbackBaseGain, 0.0f, 0.0f,
                                                    delayFeedbackCrossGain, delayFeedbackCrossGain, 0.0f, 0.0f, delayFeedbackBaseGain, 0.0f,
                                                    0.0f, 0.0f, 0.0f, 0.0f, 0.0f, feedbackGain);

            for (int i = 0; i < sampleCount; i++)
            {
                Vector6 channelInput = new Vector6
                {
                    X = *((float *)inputBuffers[0] + i) * 64,
                    Y = *((float *)inputBuffers[1] + i) * 64,
                    Z = *((float *)inputBuffers[2] + i) * 64,
                    W = *((float *)inputBuffers[3] + i) * 64,
                    V = *((float *)inputBuffers[4] + i) * 64,
                    U = *((float *)inputBuffers[5] + i) * 64
                };

                Vector6 delayLineValues = new Vector6
                {
                    X = state.DelayLines[0].Read(),
                    Y = state.DelayLines[1].Read(),
                    Z = state.DelayLines[2].Read(),
                    W = state.DelayLines[3].Read(),
                    V = state.DelayLines[4].Read(),
                    U = state.DelayLines[5].Read()
                };

                Vector6 temp = MatrixHelper.Transform(ref channelInput, ref delayFeedback) + channelInput * inGain;

                state.UpdateLowPassFilter(ref Unsafe.As <Vector6, float>(ref temp), channelCount);

                *((float *)outputBuffers[0] + i) = (channelInput.X * dryGain + delayLineValues.X * outGain) / 64;
                *((float *)outputBuffers[1] + i) = (channelInput.Y * dryGain + delayLineValues.Y * outGain) / 64;
                *((float *)outputBuffers[2] + i) = (channelInput.Z * dryGain + delayLineValues.Z * outGain) / 64;
                *((float *)outputBuffers[3] + i) = (channelInput.W * dryGain + delayLineValues.W * outGain) / 64;
                *((float *)outputBuffers[4] + i) = (channelInput.V * dryGain + delayLineValues.V * outGain) / 64;
                *((float *)outputBuffers[5] + i) = (channelInput.U * dryGain + delayLineValues.U * outGain) / 64;
            }
        }
    public void DrawRobot(Vector6 jointsDeg, Material material)
    {
        Forward(jointsDeg, ref _currentPose);

        for (int i = 0; i < 7; i++)
        {
            var mesh      = _joints[i];
            var transform = _base.inverse * (_currentPose[i] * _init[i].inverse);
            Graphics.DrawMesh(mesh, transform.ToLeftHanded(), material, 0);
        }

        Graphics.DrawMesh(_tool, (_base.inverse * _currentPose[6]).ToLeftHanded(), material, 0);
    }
Example #25
0
        /// <summary>
        ///   This method is called when the <c>ShearingChanged</c> event has
        ///   been triggered.
        /// </summary>
        /// <param name="oldShearing">
        ///   The shearing this grid had previously.
        /// </param>
        /// <param name="newShearing">
        ///   The shearing this grid has now.
        /// </param>
        private void OnShearingChanged(Vector6 oldShearing, Vector6 newShearing)
        {
            var args  = new ShearingEventArgs(oldShearing, newShearing);
            var delta = args.Difference;

            for (var i = 0; i < 6; ++i)
            {
                _cacheIsDirty |= Mathf.Abs(delta[i]) > Mathf.Epsilon;
            }

            if (ShearingChanged == null)
            {
                return;
            }

            ShearingChanged(this, args);
        }
Example #26
0
    void Start()
    {
        usuario1.nomeUsuario = "marcos";      //Setando valores na Struct
        usuario1.vidaUsuario = 100;
        usuario1.danoUsuario = 100;

        usuario2.nomeUsuario = "martin";      //Setando valores na Struct
        usuario2.vidaUsuario = 50;
        usuario2.danoUsuario = 50;

        Debug.Log(usuario1.vidaUsuario);        //Apresentando valores contidos na struct, acessando seus atributos
        Debug.Log(usuario2.vidaUsuario);

        Vector6 vetor = new Vector6(1, 2, 3, 4, 5, 6);

        Debug.Log(vetor.w);
    }
Example #27
0
    //{type:"type1", hp:100, mspd:1.2f, aspd:1, atk:1, def:1, dropCoins:10, dropExp:10, cstk:8, evd:10, stk:25}
    public CharacterData( Hashtable jsonHash  )
    {
        type  = jsonHash["type"].ToString();
        maxHp = int.Parse(jsonHash["hp"].ToString());
        moveSpeed  = float.Parse(jsonHash["mspd"].ToString()) * Utils.characterScale;
        attackSpeed = float.Parse(jsonHash["aspd"].ToString());
        attack  = jsonHash["atk"] as Vector6;//Vector6.createWithHashtable(jsonHash, "atk");
        defense = jsonHash["def"] as Vector6;//Vector6.createWithHashtable(jsonHash, "def");
        rewardSilver  = int.Parse(jsonHash["rewardSilver"].ToString());
        rewardExp = int.Parse(jsonHash["rewardExp"].ToString());

        // delete by why 2014.2.7
        //		criticalStk  = int.Parse(jsonHash["cstk"].ToString());
        //		evade = int.Parse(jsonHash["evd"].ToString());
        //		strike  = int.Parse(jsonHash["stk"].ToString());

        resetEft();
    }
Example #28
0
    //gwp
    public override int defenseAtk( Vector6 damage ,   GameObject atkerObj  )
    {
        Enemy enemy = atkerObj.GetComponent<Enemy>();
        if(isInvincible){
            if(isRebound){
                enemy.defenseAtk(damage,this.gameObject);
            }
            return 0;
        }
        HeroData heroData = data as HeroData;
        if(heroData.getPSkillByID("PRIEST4") != null){
            if(StaticData.computeChance(30,100)){
                enemy.defenseAtk(damage,this.gameObject);
            }
        }

        return base.defenseAtk(damage, atkerObj);
    }
Example #29
0
        void update_RCS()
        {
            //init RCS wrappers and calculate MaxThrust taking torque imbalance into account
            MaxThrustRCS = new Vector6();
            var RCSThrusImbalance = new Vector3[6];

            for (int i = 0; i < NumActiveRCS; i++)
            {
                var t = ActiveRCS[i];
                t.InitState();
                for (int j = 0, tCount = t.rcs.thrusterTransforms.Count; j < tCount; j++)
                {
                    var T      = t.rcs.thrusterTransforms[j];
                    var thrust = refT.InverseTransformDirection((t.rcs.useZaxis ? T.forward : T.up) * t.maxThrust);
                    MaxThrustRCS.Add(thrust);
                    var pos     = refT.InverseTransformDirection(T.position - VSL.Physics.wCoM);
                    var athrust = Vector3.zero;
                    for (int k = 0; k < 3; k++)
                    {
                        athrust[k] = thrust[k];
                        var p = pos; p[k] = 0;
                        RCSThrusImbalance[thrust[k] > 0 ? k : k + 3] += Vector3.Cross(p, athrust);
                        athrust[k] = 0;
                    }
                }
                if (NoActiveRCS)
                {
                    continue;
                }
                t.InitTorque(VSL, RCSOptimizer.C.TorqueRatioFactor);
                t.UpdateCurrentTorque(1);
                t.ApplyPreset();
            }
            if (!MaxThrustRCS.IsZero())
            {
                MaxThrustRCS.Scale(new Vector6(
                                       1 / Utils.ClampL(RCSThrusImbalance[0].sqrMagnitude, 1),
                                       1 / Utils.ClampL(RCSThrusImbalance[1].sqrMagnitude, 1),
                                       1 / Utils.ClampL(RCSThrusImbalance[2].sqrMagnitude, 1),
                                       1 / Utils.ClampL(RCSThrusImbalance[3].sqrMagnitude, 1),
                                       1 / Utils.ClampL(RCSThrusImbalance[4].sqrMagnitude, 1),
                                       1 / Utils.ClampL(RCSThrusImbalance[5].sqrMagnitude, 1)));
            }
        }
Example #30
0
 public override bool Equals(object obj)
 {
     if (obj is Vector6)
     {
         Vector6 A = (Vector6)obj;
         if (A.largeRow != this.largeRow)
         {
             return(false);
         }
         else if (A.largeColumn != this.largeColumn)
         {
             return(false);
         }
         else if (A.smallRow != this.smallRow)
         {
             return(false);
         }
         else if (A.smallColumn != this.smallColumn)
         {
             return(false);
         }
         else if (A.wonBy != this.wonBy)
         {
             return(false);
         }
         else if (A.valid != this.valid)
         {
             return(false);
         }
         else
         {
             return(true);
         }
     }
     else
     {
         throw new InvalidCastException("The object 'obj' is not castable to the type 'Vector6'");
     }
 }
Example #31
0
 public override int defenseAtk( Vector6 damage ,   GameObject atkerObj  )
 {
     if(isDead)return 0;
     int dam = base.getDamageValue(damage);
     //		ConsoleObj.instance.showInfo(atkerObj.name+"_AtkValue:"+damage+" "+gameObject.name+"_RealDef:"+realDef+" damage:"+damage+"-"+realDef+"="+dam);
     realHp -= dam;
     showHpBar();
     if(realHp<= 0)
     {
         dead();
     }else{
         if (!isPlayAtkAnim
                 && state != CAST_STATE
                 && state != MOVE_TARGET_STATE
                 && state != MOVE_TARGET_DIRECTLY_STATE
                 && state != MOVE_STATE){
             playAnim("Damage");
         }
     }
     checkAtkerDefense(atkerObj);
     return dam;
 }
Example #32
0
 public override int defenseAtk( Vector6 damage ,   GameObject atkerObj  )
 {
     if(isDead)return 0;
     int dam = base.getDamageValue(damage);
     Debug.Log(dam+"    realHp---->"+realHp);
     realHp -= dam;
     Debug.Log("realHp---->"+realHp);
     showHpBar();
     defenseAtkNum ++;
     if(realHp<= 0)
     {
         dead();
     }else{
         if(defenseAtkNum > 1){
             if(! isDead){
                  //this.gameObject.collider.enabled = false;
                  Hero hero = atkerObj.GetComponent<Hero>();
                  hero.setTarget(null);
                 if(IsInvoking("healTarget"))
                 {
                     CancelInvoke("healTarget");
                 }
                  playAnim("Move");
             }
         }
         else {
                 if (!isPlayAtkAnim
                         && state != CAST_STATE
                         && state != MOVE_TARGET_STATE
                         && state != MOVE_TARGET_DIRECTLY_STATE
                         && state != MOVE_STATE){
                     playAnim("Damage");
                 }
         }
     }
     checkAtkerDefense(atkerObj);
     return dam;
 }
    public Vector6 Read()
    {
        if (!Connected)
        {
            Debug.Log("Can't receive data, not connected.");
            return(new Vector6());
        }

        var stream = _client.GetStream();

        while (stream.DataAvailable)
        {
            stream.Read(_bytes, 0, _bytes.Length);
        }

        Vector6 joints = new Vector6();

        for (int i = 0; i < 6; i++)
        {
            joints[i] = BitConverter.ToSingle(_bytes, i * 4);
        }

        return(joints);
    }
        private void GetPointcloud(Image colorImage, Image depth, Image xyzImage, robotState state)
        {
            flag = false;
            times++;  //make sure this program has been processed once
            //give out the tcp value and the tranformation matrix
            if (state.cartesianInfo != null)
            {
                tcp    = new Vector6 <double>();
                ROT    = new rot();
                tcp    = state.cartesianInfo.tcp;
                ROT.Rx = state.cartesianInfo.tcp.Rx;
                ROT.Ry = state.cartesianInfo.tcp.Ry;
                ROT.Rz = state.cartesianInfo.tcp.Rz;

                matrix_R = RobMath.RotVec2Matrix(ROT);
                matrix_T_tcp2base.SetSubMatrix(0, 3, 0, 3, matrix_R);
                matrix_T_tcp2base[3, 0] = 0;
                matrix_T_tcp2base[3, 1] = 0;
                matrix_T_tcp2base[3, 2] = 0;
                matrix_T_tcp2base[3, 3] = 1;
                matrix_T_tcp2base[0, 3] = tcp.X;
                matrix_T_tcp2base[1, 3] = tcp.Y;
                matrix_T_tcp2base[2, 3] = tcp.Z;

                matrix_T = (DenseMatrix)(matrix_T_tcp2base * matrix_T_tool2tcp);
                //info.Text = tcp.ToString();
                //info.Text = matrix_T_tcp2base.ToString();

                BGRA[]   colorArray = colorImage.GetPixels <BGRA>().ToArray();
                Short3[] xyzArray   = xyzImage.GetPixels <Short3>().ToArray();

                MathNet.Numerics.LinearAlgebra.Double.Matrix matrix_P1 = new DenseMatrix(4, 1);
                MathNet.Numerics.LinearAlgebra.Double.Matrix matrix_P0 = new DenseMatrix(4, 1);

                Vector3[] vertices = new Vector3[num];
                Color32[] colors   = new Color32[num];
                //indices = new int[num];
                //描画する点の配列番号を記録。(全ての点を描画)
                //for (int i = 0; i < num; i++)
                //{
                //    indices[i] = i;
                //}

                for (int i = 0; i < num; i++)
                {
                    //頂点座標の代入
                    vertices[i].x = xyzArray[i].X * 0.001f;
                    vertices[i].y = xyzArray[i].Y * 0.001f;
                    vertices[i].z = xyzArray[i].Z * 0.001f;
                    //色の代入
                    colors[i].b = colorArray[i].B;
                    colors[i].g = colorArray[i].G;
                    colors[i].r = colorArray[i].R;
                    colors[i].a = 255;

                    ////for each point-1 , use the T-matrix to tansform it to  point-0

                    matrix_P1[0, 0] = vertices[i].x;
                    matrix_P1[1, 0] = vertices[i].y;
                    matrix_P1[2, 0] = vertices[i].z;
                    matrix_P1[3, 0] = 1;
                    matrix_P0       = (DenseMatrix)(matrix_T * matrix_P1);

                    //according to the position of the arm to save the pointcloud data
                    switch (position)
                    {
                    case 1:
                    {
                        vertices_0_b1[i].x = (float)matrix_P0[0, 0];
                        vertices_0_b1[i].y = (float)matrix_P0[1, 0];
                        vertices_0_b1[i].z = (float)matrix_P0[2, 0];
                        colors_0_b1[i]     = colors[i];
                    }
                    break;

                    case 2:
                    {
                        vertices_0_b2[i].x = (float)matrix_P0[0, 0];
                        vertices_0_b2[i].y = (float)matrix_P0[1, 0];
                        vertices_0_b2[i].z = (float)matrix_P0[2, 0];
                        colors_0_b2[i]     = colors[i];
                    }
                    break;

                    case 3:
                    {
                        vertices_0_b3[i].x = (float)matrix_P0[0, 0];
                        vertices_0_b3[i].y = (float)matrix_P0[1, 0];
                        vertices_0_b3[i].z = (float)matrix_P0[2, 0]; colors_0_b1[i] = colors[i];
                        colors_0_b3[i]     = colors[i];
                    }
                    break;

                    case 4:
                    {
                        vertices_0_b4[i].x = (float)matrix_P0[0, 0];
                        vertices_0_b4[i].y = (float)matrix_P0[1, 0];
                        vertices_0_b4[i].z = (float)matrix_P0[2, 0];
                        colors_0_b4[i]     = colors[i];
                    }
                    break;

                    case 5:
                    {
                        vertices_0_b5[i].x = (float)matrix_P0[0, 0];
                        vertices_0_b5[i].y = (float)matrix_P0[1, 0];
                        vertices_0_b5[i].z = (float)matrix_P0[2, 0];
                        colors_0_b5[i]     = colors[i];
                    }
                    break;
                    }
                }
                info.Text = "times:" + times.ToString() + "," + "position:" + position.ToString() + "," + "scanning and processing done!";
            }
            else
            {
                info.Text = "times:" + times.ToString() + "state.cartesianInfo is null!";
            }
        }
Example #35
0
 public Vector6 Multip(Vector6 v6)
 {
     this.PHY *= v6.PHY;
     this.IMP *= v6.IMP;
     this.PSY *= v6.PSY;
     this.EXP *= v6.EXP;
     this.ENG *= v6.ENG;
     this.MAG *= v6.MAG;
     return this;
 }
Example #36
0
 public Vector6 ReverseVelocityTransform(Vector6 absVelocities)
 {
     throw new NotImplementedException();
 }
Example #37
0
    public virtual int defenseAtk(Vector6 atk, GameObject atkerObj)
    {
        int rewardDamage = 0;
        if(null != addConcentrateFireDelegate){
            rewardDamage = addConcentrateFireDelegate(this);
        }

        int heavyDamage = 0;
        if(null != addCruelCutsDelegate){
            heavyDamage = addCruelCutsDelegate(this);
        }

        int additionalDamage = 0;
        additionalDamage += showNebula20Passive(atkerObj);

        if (this.isDead)
            return 0;
        //int dam = Mathf.Max(1, damage - realDef);

        int dam = getDamageValue(atk);
        dam += (int)(dam*((float)rewardDamage/100f));
        dam += (int)(dam*((float)heavyDamage/100f));
        dam += (int)(dam*((float)additionalDamage/100f));

        canShowNebula25Passive();

        if (!this.isHealthLocked)
        {
            if(this.hurtBeforeState == HurtBeforeState.NOTHURT)
            {
                this.characterAI.OnDefenseAtkHurtBeforeByDamageValue(dam);
                this.showHpBar();
                return 0;
            }
            this.realHp -= dam;
            this.characterAI.OnDefenseAtkHurtAfterByRemainsCurrentHP(this.realHp);
        }

        this.showHpBar ();

        this.changeStateColor(Character.damageColor);

        if (this.realHp <= 0)
        {
            if(this is GRoot && LevelMgr.Instance.isRebirth){
                GRoot groot = this as GRoot;
                float t = 4f;
                State state = new State((int)t, null);
                groot.addAbnormalState(state, Character.ABNORMAL_NUM.LAYDOWN);
                groot.lossTargetBeforeState = LossTargetBeforeState.LOSSTARGET;
                StartCoroutine(delayRebirth(t));

                foreach(Enemy e in EnemyMgr.enemyHash.Values){
                    if(e.targetObj != null && e.targetObj == this.gameObject){
                        this.dropAtkPosition(e);
                        e.targetObj = null;
                        e.checkOpponent();
                    }
                }

                return 0;
            }
            iTween.Stop(gameObject);
            dead ();
        }
        else
        {
            if(this.state == Character.CAST_STATE ||
                !this.isActionStateActive(ActionStateIndex.DamageActionState))
            {
                return dam;
            }

            this.attachAnim("Damage");

            if(this.isActionStateActive(ActionStateIndex.MoveState))
            {
                this.playDamageEffect(atkerObj,0);
            }
        }
        return dam;
    }
Example #38
0
    private IEnumerator timer2_Tick()
    {
        while (true)
        {
            try
            {
                aRTDE.startSync(); //启动 RTDE server 同步
            }
            catch
            {
                throw;
            }
            if (aRTDE.isSynchronizing)
            {
                RTDEOutputObj outobj = aRTDE.getOutputObj(); //读取 RTDE output 数据
                CurTCPPos = outobj.actual_TCP_pose;
                //CurPX = outobj.actual_TCP_pose.X;
                //CurPY = outobj.actual_TCP_pose.Y;
                //CurPZ = outobj.actual_TCP_pose.Z;
                //CurRX = outobj.actual_TCP_pose.Rx;
                //CurRY = outobj.actual_TCP_pose.Ry;
                //CurRZ = outobj.actual_TCP_pose.Rz;

                CurJointPos = outobj.actual_q;
                //CurJ1 = outobj.actual_q.X;//机座
                //CurJ2 = outobj.actual_q.Y;//肩部
                //CurJ3 = outobj.actual_q.Z;//肘部
                //CurJ4 = outobj.actual_q.Rx;//手腕1
                //CurJ5 = outobj.actual_q.Ry;//手腕2
                //CurJ6 = outobj.actual_q.Rz;//手腕3

                string      tcppose = outobj.actual_TCP_pose.ToString();
                RTDEMessage aMsg    = new RTDEMessage("Content of message", "Message source",
                                                      RTDEMessage.INFO_MESSAGE); //创建 RTDEMessage 对象, Warning Level 为 Info
                aRTDE.sendMessage(aMsg);                                         //发送 RTDEMessage
                RTDEInputObj inobj = new RTDEInputObj();                         //创建 RTDE input 对象
                                                                                 // 将数字输出置为 0b00000011,RTDEInputObj 同步数据一定要是 RTDEConfig.xml 文件中已经配置好的 input
                inobj.standard_digital_output = 3;
                aRTDE.setInputObj(inobj);                                        //发送 input
            }

            //TCP当前位置
            if (CurTCPPos != null)
            {
                //ActTCPTB_X.Text = (CurTCPPos.X * 1000).ToString("0.00");
                //ActTCPTB_Y.Text = (CurTCPPos.Y * 1000).ToString("0.00");
                //ActTCPTB_Z.Text = (CurTCPPos.Z * 1000).ToString("0.00");
                //ActTCPTB_RX.Text = (CurTCPPos.Rx).ToString("0.00");
                //ActTCPTB_RY.Text = (CurTCPPos.Ry).ToString("0.00");
                //ActTCPTB_RZ.Text = (CurTCPPos.Rz).ToString("0.00");
            }
            //关节当前位置
            if (CurJointPos != null)
            {
                Pos[0].text = (CurJointPos.X * 180 / PI).ToString("0.00");
                Pos[1].text = (CurJointPos.Y * 180 / PI).ToString("0.00");
                Pos[2].text = (CurJointPos.Z * 180 / PI).ToString("0.00");
                Pos[3].text = (CurJointPos.Rx * 180 / PI).ToString("0.00");
                Pos[4].text = (CurJointPos.Ry * 180 / PI).ToString("0.00");
                Pos[5].text = (CurJointPos.Rz * 180 / PI).ToString("0.00");
            }
            aRTDE.stopSync(); //关闭 RTDE server 同步,释放资源
            yield return(new WaitForSeconds(1f));
        }
    }
Example #39
0
 /// <summary>
 ///   Instantiate a new object form previous and current value.
 /// </summary>
 /// <para name="previous">
 ///   Previous value of the shearing.
 /// </para>
 /// <para name="current">
 ///   Current value of the shearing.
 /// </para>
 public ShearingEventArgs(Vector6 previous, Vector6 current)
 {
     _difference = current - previous;
 }
Example #40
0
    public static void splashDamage(Character centerChar, Character atker, ICollection clt, Vector6 damage, int aoeRadius)
    {
        ArrayList cltClone = new ArrayList(clt);
        foreach(Character character in cltClone)
        {
            if(centerChar != character)
            {
                Vector2 vc2 = centerChar.transform.position - character.transform.position;
                if( isInOval(aoeRadius,aoeRadius, vc2) )
                {
                    character.defenseAtk(damage, atker.gameObject);
                }
            }

        }
        cltClone.Clear();
    }
Example #41
0
 protected virtual void initRealDef(HeroData heroD)
 {
     realDef.Zero();
     Vector6 temp = new Vector6();
     float p = (heroD.lv-1)*heroD.defProportion;
     temp.Add(new Vector6(p,p,p,p,p,p));
     temp.Add(heroD.itemMult.defense).Add(heroD.skillMult.defense).Div(100).Add(1);
     realDef.Add(heroD.defense).Add(heroD.itemAdd.defense).Add(heroD.skillAdd.defense).Multip(temp);
 }
Example #42
0
 //end
 protected virtual void initRealAtk(HeroData heroD)
 {
     realAtk.Zero();
     Vector6 temp = new Vector6();
     float p = (heroD.lv-1)*heroD.atkProportion;
     temp.Add(new Vector6(p,p,p,p,p,p));
     temp.Add(heroD.itemMult.attack).Add(heroD.skillMult.attack).Div(100).Add(1);
     realAtk.Add(heroD.attack).Add(heroD.itemAdd.attack).Add(heroD.skillAdd.attack).Multip(temp).Multip(0.3f);
 }
Example #43
0
 public float getInitRealDef(HeroData heroD)
 {
     Vector6 initRealDef = new Vector6();
     initRealDef.Zero();
     Vector6 temp = new Vector6();
     float p = (heroD.lv-1)*heroD.defProportion;
     temp.Add(new Vector6(p,p,p,p,p,p));
     temp.Add(heroD.itemMult.defense).Add(heroD.skillMult.defense).Div(100).Add(1);
     initRealDef.Add(heroD.defense).Add(heroD.itemAdd.defense).Add(heroD.skillAdd.defense).Multip(temp);
     return initRealDef.PHY;
 }
Example #44
0
    public override int defenseAtk( Vector6 damage ,   GameObject atkerObj  )
    {
        if(atkerObj.GetComponent<Character>().data.type == EnemyDataLib.Ch1_Male_Prisoner1){
            if(this.isOnceMusic){
                if(StaticData.computeChance(1,2)){
                    MusicManager.playEffectMusic("SFX_character_damage_2a");
                }else{
                    MusicManager.playEffectMusic("SFX_character_damage_2b");
                }
                this.isOnceMusic = false;
            }
        }else{
            if(StaticData.computeChance(1,2)){
                MusicManager.playEffectMusic("SFX_character_damage_2a");
            }else{
                MusicManager.playEffectMusic("SFX_character_damage_2b");
            }
        }

        if(state != CAST_STATE && data.type != HeroData.MANTIS)
        {
            StartCoroutine(this.delayedAutoSelectTarget(0.5f,atkerObj));
        }

        int dam = base.defenseAtk(damage, atkerObj);
        //xingyihua healmenu hp change
        Message msg = new Message(MsgCenter.HERO_HP_CHANGE, this);
        msg.data = this;
        MsgCenter.instance.dispatch(msg);

        foreach(Hero hero in HeroMgr.heroHash.Values){
            if(hero is GRoot){
                GRoot groot = hero as GRoot;
                HeroData hd = groot.data as HeroData;
                if(hd.state == HeroData.State.SELECTED && !groot.isDead && groot.canShowGrootPassive("GROOT20B")){
                    VineShield vs = this.transform.GetComponentInChildren<VineShield>();
                    if(vs != null){
                        groot.showGroot20BPassive(damage,atkerObj);
                    }
                }
            }
        }

        return dam;
    }
Example #45
0
 public static Vector <double> ToVector(Vector6 vs)
 {
     return(Vector <double> .Build.DenseOfArray(new double[] { vs.alpha, vs.beta, vs.gamma, vs.x, vs.y, vs.z }));
 }
Example #46
0
 public virtual void resetDef()
 {
     realDef = data.defense.clone ();
 }
Example #47
0
    public static float Angle(Vector6 a, Vector6 b)
    {
        Vector6 A = a;
        Vector6 B = b;

        A.largeRow    = A.largeRow % 360;
        A.largeColumn = A.largeColumn % 360;
        A.smallRow    = A.smallRow % 360;
        A.smallColumn = A.smallColumn % 360;
        A.wonBy       = A.wonBy % 360;
        A.valid       = A.valid % 360;
        B.largeRow    = B.largeRow % 360;
        B.largeColumn = B.largeColumn % 360;
        B.smallRow    = B.smallRow % 360;
        B.smallColumn = B.smallColumn % 360;
        B.wonBy       = B.wonBy % 360;
        B.valid       = B.valid % 360;
        if (A.largeRow > 180)
        {
            A.largeRow = -(360 - A.largeRow);
        }
        if (A.largeColumn > 180)
        {
            A.largeColumn = -(360 - A.largeColumn);
        }
        if (A.smallRow > 180)
        {
            A.smallRow = -(360 - A.smallRow);
        }
        if (A.smallColumn > 180)
        {
            A.smallColumn = -(360 - A.smallColumn);
        }
        if (A.wonBy > 180)
        {
            A.wonBy = -(360 - A.wonBy);
        }
        if (A.valid > 180)
        {
            A.valid = -(360 - A.valid);
        }
        if (B.largeRow > 180)
        {
            B.largeRow = -(360 - B.largeRow);
        }
        if (B.largeColumn > 180)
        {
            B.largeColumn = -(360 - B.largeColumn);
        }
        if (B.smallRow > 180)
        {
            B.smallRow = -(360 - B.smallRow);
        }
        if (B.smallColumn > 180)
        {
            B.smallColumn = -(360 - B.smallColumn);
        }
        if (B.wonBy > 180)
        {
            B.wonBy = -(360 - B.wonBy);
        }
        if (B.valid > 180)
        {
            B.valid = -(360 - B.valid);
        }
        return(Mathf.Sqrt(((B.largeRow - A.largeRow) * (B.largeRow - A.largeRow)) +
                          ((B.largeColumn - A.largeColumn) * (B.largeColumn - A.largeColumn)) +
                          ((B.smallRow - A.smallRow) * (B.smallRow - A.smallRow)) +
                          ((B.smallColumn - A.smallColumn) * (B.smallColumn - A.smallColumn)) +
                          ((B.wonBy - A.wonBy) * (B.wonBy - A.wonBy) * (A.valid - B.valid))));
    }
Example #48
0
 public bool IsCoordValid(Vector6 coord)
 {
     throw new NotImplementedException();
 }
Example #49
0
 public static float Dot(Vector6 a, Vector6 b)
 {
     return((a.largeRow * b.largeRow) + (a.largeColumn * b.largeColumn) + (a.smallRow * b.smallRow) + (a.smallColumn * b.smallColumn) + (a.wonBy * b.wonBy) + (a.valid * b.valid));
 }
Example #50
0
 public Vector3 ForwardVelocityTransform(Vector6 velocities)
 {
     throw new NotImplementedException();
 }
Example #51
0
    /// <summary>
    /// 计时器触发
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    private IEnumerator timer1_Tick()
    {
        while (true)
        {
            #region 读取机器人状态
            Vector6 <double> l4 = null;
            //Vector6<double> j = null;
            if (aRTClient.Status == RTClientStatus.Syncing)
            {
                RTClientObj      aRTClientObj = aRTClient.getRTClientObj(); //读取aRTClientObj
                double           currenttime  = aRTClientObj.timestamp;
                Vector6 <double> a            = aRTClientObj.actual_current;
                ulong            b            = aRTClientObj.actual_digital_input_bits;
                ulong            c            = aRTClientObj.actual_digital_output_bits;
                double           d            = aRTClientObj.actual_execution_time;
                Vector6 <double> e1           = aRTClientObj.actual_joint_voltage;//真实关节电压
                double           f            = aRTClientObj.actual_main_voltage;
                double           g            = aRTClientObj.actual_momentum;
                double           h            = aRTClientObj.actual_momentum_internal1;
                double           i            = aRTClientObj.actual_momentum_internal2;
                j = aRTClientObj.actual_q;                               //关节真实位置
                Vector6 <double> k  = aRTClientObj.actual_qd;            //关节真实速度
                double           l  = aRTClientObj.actual_robot_current; //机器人真实电流
                double           l2 = aRTClientObj.actual_robot_voltage; //机器人真实市电电压
                Vector6 <double> l3 = aRTClientObj.actual_TCP_force;     //tcp的真实受力
                l4 = aRTClientObj.actual_TCP_pose;                       //TCP的真实位置
                Vector6 <double> l5  = aRTClientObj.actual_TCP_speed;    //tcp的真实速度
                Vector3 <double> l6  = aRTClientObj.actual_tool_accelerometer;
                Vector6 <double> l7  = aRTClientObj.actual_tool_accelerometer_internal;
                double           l8  = aRTClientObj.elbow_position;
                double           l9  = aRTClientObj.elbow_velocity;
                Vector6 <double> l10 = aRTClientObj.joint_control_output;
                Vector6 <int>    l11 = aRTClientObj.joint_mode;
                Vector6 <double> l12 = aRTClientObj.joint_temperatures;
                double           l13 = aRTClientObj.program_state;
                double           l14 = aRTClientObj.robot_mode;
                double           l15 = aRTClientObj.safety_mode;
                Vector6 <double> l16 = aRTClientObj.safety_mode_internal;
                double           l17 = aRTClientObj.speed_scaling;
                Vector6 <double> l18 = aRTClientObj.target_current;
                Vector6 <double> l19 = aRTClientObj.target_moment;
                Vector6 <double> l20 = aRTClientObj.target_q;         //关节目标位置,单位是弧度
                Vector6 <double> l21 = aRTClientObj.target_qd;        //关节目标速度
                Vector6 <double> l22 = aRTClientObj.target_qdd;       //关节目标加速度
                Vector6 <double> l23 = aRTClientObj.target_TCP_pose;  //TCP目标位姿
                Vector6 <double> l24 = aRTClientObj.target_TCP_speed; //TCP目标速度
                double           l25 = aRTClientObj.test_value;


                //使用aRTClientObj中的数据
                //aRTClient.sendScript("movel(p[" + j1.ToString() + ",0.2,0.3,0,0,0],a=0.8,v=0.5)"); //发送脚本给机器人;
                //aRTClient.sendScript("rv=[1,2,1]"); //发送脚本给机器人
            }
            //TCP当前位置
            if (l4 != null)
            {
                //ActTCPTB_X.Text = (l4.X * 1000).ToString("0.00");
                //ActTCPTB_Y.Text = (l4.Y * 1000).ToString("0.00");
                //ActTCPTB_Z.Text = (l4.Z * 1000).ToString("0.00");
                //ActTCPTB_RX.Text = (l4.Rx * 1000).ToString("0.00");
                //ActTCPTB_RY.Text = (l4.Ry * 1000).ToString("0.00");
                //ActTCPTB_RZ.Text = (l4.Rz * 1000).ToString("0.00");
            }
            //关节当前位置
            if (j != null)
            {
                Pos[0].text = (j.X * 180 / PI).ToString("0.00");
                Pos[1].text = (j.Y * 180 / PI).ToString("0.00");
                Pos[2].text = (j.Z * 180 / PI).ToString("0.00");
                Pos[3].text = (j.Rx * 180 / PI).ToString("0.00");
                Pos[4].text = (j.Ry * 180 / PI).ToString("0.00");
                Pos[5].text = (j.Rz * 180 / PI).ToString("0.00");
            }
            yield return(new WaitForSeconds(0.1f));

            #endregion
        }
    }
Example #52
0
 public Vector6 Div(Vector6 v6)
 {
     this.PHY /= v6.PHY;
     this.IMP /= v6.IMP;
     this.PSY /= v6.PSY;
     this.EXP /= v6.EXP;
     this.ENG /= v6.ENG;
     this.MAG /= v6.MAG;
     return this;
 }
Example #53
0
 public override int defenseAtk(Vector6 atk, GameObject atkerObj)
 {
     if(isGodMode)atk=new Vector6(0,0,0,0,0,0);
     return base.defenseAtk (atk, atkerObj);
 }
Example #54
0
 protected Vector6 showGroot10APassive(Vector6 damage)
 {
     SkillDef skillDef = SkillLib.instance.getSkillDefBySkillID("GROOT10A");
     int chanceValue = (int)skillDef.passiveEffectTable["universal"];
     int tempDef = (int)((Effect)skillDef.passiveEffectTable["def_PHY"]).num;
     if(StaticData.computeChance(chanceValue,100)){
         Vector6 tempDamage = damage.clone();
         tempDamage.Multip(1f-(float)tempDef/100f);
         return tempDamage;
     }
     return damage;
 }
Example #55
0
 public Vector6 ReversePosTransform(Vector6 absCoords)
 {
     throw new NotImplementedException();
 }
Example #56
0
 public int Distance(Vector6 other)
 {
     return(Math.Abs(a - other.a) + Math.Abs(b - other.a) + Math.Abs(c - other.c) + Math.Abs(d - other.d) + Math.Abs(f - other.f));
 }
Example #57
0
 public Vector6 ForwardPosTransform(Vector6 coords)
 {
     throw new NotImplementedException();
 }
Example #58
0
 public Vector6 Sub(Vector6 v6)
 {
     this.PHY -= v6.PHY;
     this.IMP -= v6.IMP;
     this.PSY -= v6.PSY;
     this.EXP -= v6.EXP;
     this.ENG -= v6.ENG;
     this.MAG -= v6.MAG;
     return this;
 }
Example #59
0
 public override int defenseAtk( Vector6 damage ,   GameObject atkerObj  )
 {
     return base.defenseAtk(damage, atkerObj);
 }
Example #60
0
    public Vector6 clone()
    {
        Vector6 v6 = new Vector6();
        v6.PHY = this.PHY;
        v6.IMP = this.IMP;
        v6.PSY = this.PSY;
        v6.EXP = this.EXP;
        v6.ENG = this.ENG;
        v6.MAG = this.MAG;

        return v6;
    }