示例#1
0
        public override void Do()
        {
            base.Do();
            int num1 = 1;

            string[] args1  = this.args;
            int      index1 = num1;
            int      num2   = index1 + 1;
            float    shape  = float.Parse(args1[index1]);
            Dictionary <string, Vector3> v3Dic       = this.scenario.commandController.V3Dic;
            Dictionary <string, Vector3> dictionary1 = v3Dic;

            string[] args2  = this.args;
            int      index2 = num2;
            int      num3   = index2 + 1;
            string   index3 = args2[index2];
            Vector3  min    = dictionary1[index3];
            Dictionary <string, Vector3> dictionary2 = v3Dic;

            string[] args3  = this.args;
            int      index4 = num3;
            int      num4   = index4 + 1;
            string   index5 = args3[index4];
            Vector3  max    = dictionary2[index5];

            v3Dic[this.answer] = MathfEx.GetShapeLerpPositionValue(shape, min, max);
        }
示例#2
0
            public bool Calculate(IEnumerable <CharaData> datas, out Vector3 pos, out Vector3 ang)
            {
                if (datas == null || !datas.Any <CharaData>())
                {
                    pos = Vector3.get_zero();
                    ang = Vector3.get_zero();
                    return(false);
                }
                float shape = datas.Average <CharaData>((Func <CharaData, float>)(item => item.chaCtrl.GetShapeBodyValue(0)));

                pos = MathfEx.GetShapeLerpPositionValue(shape, this.pos.min, this.pos.max);
                ang = MathfEx.GetShapeLerpAngleValue(shape, this.ang.min, this.ang.max);
                return(true);
            }
示例#3
0
        private void Calculate()
        {
            if (!((IEnumerable <ChaControl>) this._chaCtrlList).Any <ChaControl>())
            {
                return;
            }
            float shape = ((IEnumerable <ChaControl>) this._chaCtrlList).Average <ChaControl>((Func <ChaControl, float>)(p => p.GetShapeBodyValue(0)));

            ((Component)this).get_transform().SetPositionAndRotation(Vector3.op_Addition(this.basePos, ((Component)this).get_transform().get_parent().TransformDirection(MathfEx.GetShapeLerpPositionValue(shape, this._minPos, this._maxPos))), Quaternion.Euler(Vector3.op_Addition(this.baseAng, MathfEx.GetShapeLerpAngleValue(shape, this._minAng, this._maxAng))));
        }