示例#1
0
        public void Create_BoolPropFilling_testboolFilled()
        {
            Faker _faker = new Faker();
            Too   too    = _faker.Create <Too>();

            Assert.AreNotEqual(too._testbool, default(bool));
        }
示例#2
0
        public void Create_ByteFilling_ByteTypePropFilled()
        {
            Faker _faker = new Faker();
            Too   too    = _faker.Create <Too>();

            Assert.AreNotEqual(too._byte, default(byte));
        }
示例#3
0
        public void Create_FillList_testListFilled()
        {
            Faker _faker    = new Faker();
            Too   _testList = _faker.Create <Too>();

            Assert.IsTrue(_testList._testllist.Count > 0);
        }
示例#4
0
    public static T GetData <T>(Data key)
    {
        object res = null;

        if (GameController.Datas.ContainsKey(key))
        {
            if (Type.Equals(GameController.Datas[key].GetType(), typeof(bool)))
            {
                res = PlayerPrefs.GetInt("" + key, (bool)GameController.Datas[key] ? 1 : 0) == 1;
            }
            else if (Type.Equals(GameController.Datas[key].GetType(), typeof(int)))
            {
                res = PlayerPrefs.GetInt("" + key, (int)GameController.Datas[key]);
            }
            else if (Type.Equals(GameController.Datas[key].GetType(), typeof(float)))
            {
                res = PlayerPrefs.GetFloat("" + key, (float)GameController.Datas[key]);
            }
            else if (Type.Equals(GameController.Datas[key].GetType(), typeof(string)))
            {
                res = PlayerPrefs.GetString("" + key, (string)GameController.Datas[key]);
            }
            else if (Type.Equals(GameController.Datas[key].GetType(), typeof(Vector3)))
            {
                res = Too.String2Vector3(PlayerPrefs.GetString("" + key, "" + (Vector3)GameController.Datas[key]));
            }
        }
        return((T)res);
    }
示例#5
0
 public static bool IsBetweenIdx(int idx, int minIdx, int maxIdx, int count)
 {
     idx = Too.LoopIdx(idx, count);
     return((minIdx < 0) ?
            ((maxIdx >= count) ? true : ((maxIdx >= count + minIdx) ? true : (!(maxIdx <= idx && idx <= count + minIdx)))) :
            ((maxIdx >= count) ? (minIdx <= idx) : (minIdx <= idx && idx <= maxIdx)));
 }
    void Update()
    {
        if (!downing && GameController.State == GameState.Playing)
        {
            Controller();
        }

        if (GameController.State == GameState.Playing)
        {
            if (once)
            {
                killData = new KillData(name, 0);
                gameController.killList.Add(killData);
                once = false;
            }

            Fire();
            GameOverCheck();
            Kill();
            if (killData.kill > currentKill && Too.GetData <bool>(Data.killScale) && !downing)
            {
                Scale();
                TapticPlugin.TapticManager.Impact(TapticPlugin.ImpactFeedback.Heavy);
            }

            canvasController.textHudKillNum.text = "kill : " + (killData.name == name ? killData.kill : 0).ToString();
        }

        if (downing)
        {
            desiredPos = Input.mousePosition - mouseStartPos;
            lookPos    = new Vector3(desiredPos.x, 0, desiredPos.y);
            transform.LookAt(lookPos);
        }
    }
示例#7
0
        static void Main(string[] args)
        {
            Faker faker = new Faker();
            Bar   f     = faker.Create <Bar>();

            Console.WriteLine(f == null);
            Faker    faker2    = new Faker();
            Too      _too      = faker2.Create <Too>();
            Faker    _faker    = new Faker();
            Dict     _testdict = _faker.Create <Dict>();
            Assembly ass       = Assembly.LoadFile("C:\\Users\\USER\\source\\repos\\ClassLibrary3\\GeneratorsLib\\bin\\Debug\\GeneratorsLib.dll");

            Type[] tt   = ass.GetTypes();
            Toos   ssss = _faker.Create <Toos>();
        }
示例#8
0
        public void Shoot()
        {
            time += Time.deltaTime;
            if (fireCountDown <= 0)
            {
                gunController.Shoot();

                if (Too.GetData <bool>(Data.killedNumFireRate))
                {
                    fireCountDown = 1f / (fireRate + (killData.kill * 5));
                }
                else
                {
                    fireCountDown = 1f / fireRate;
                }
            }
        }
示例#9
0
        void Update()
        {
            if (target != null && ai != null)
            {
                ai.destination = target;
            }

            if (GameController.State == GameState.Playing && !downing)
            {
                Shoot();

                fireCountDown -= Time.deltaTime;

                if (transform.position.y < 0.45f)
                {
                    downing = true;
                    GetComponent <BoxCollider>().material = gameController.SlideMat;
                    rb.mass = 20f;
                    CrownControl();
                }
                else if (transform.position.y < -2f)
                {
                    transform.parent = null;
                }

                if (downing && killingMeObjects.Count > 0)
                {
                    Kill();
                }

                if (killData.name == name && killData.kill > currentKill && Too.GetData <bool>(Data.killScale))
                {
                    Scale();
                }
            }

            if (transform.position.y < -9f)
            {
                Destroy(gameObject);
            }
        }
 public FooImpl(Too tt)
 {
 }