Пример #1
0
        public float TimeCalculation(useskilltype timetype, float time1, float time2)
        {
            float time = 0;

            switch (timetype)
            {
            case useskilltype.fixeda:
                time = time1;
                break;

            case useskilltype.random:
                time = Random.Range(time1, time2);
                break;
            }
            return(time);
        }
Пример #2
0
        public Vector3 PosCalculation(useskilltype postype, Vector3 pos, Vector3 pos1, Vector3 pos2, int dir)
        {
            Vector3 add = new Vector3();

            switch (postype)
            {
            case useskilltype.fixeda:
                add = pos + new Vector3(pos1.x * dir, pos1.y, pos1.z);;
                break;

            case useskilltype.random:
                Vector3 sdas = Vector3Extensions.RandomMinMax(pos1, pos2);
                add = pos + new Vector3(sdas.x * dir, sdas.y, sdas.z);
                break;
            }
            return(add);
        }