Exemple #1
0
    public void Fly(float flySpeed, Quaternion quaternion, Vector3 pos, int damage, bool owner, int id, ObjectPool objectPool = null)
    {
        this.id            = id;
        transform.position = pos;
        transform.rotation = quaternion;
        this.flySpeed      = flySpeed;
        //rigidbody.velocity =(transform.forward.normalized*flySpeed);
        this.damage = damage;
        this.owner  = owner;
        if (objectPool != null)
        {
            effectPool = objectPool;
        }
        staticBulletVo = StaticDataPool.Instance.staticBulletPool.GetStaticDataVo(id);
        switch (id)
        {
        case 1: Type_1(); break;

        case 2: Type_1(); break;

        case 3: Type_3(); break;

        case 4: Type_1(); break;
        }
        TimeLine.GetInstance().AddTimeEvent(HideByTime, staticBulletVo.destroyTime, null, gameObject);
    }
Exemple #2
0
 public void AddData(string[] lineArray)
 {
     for (int i = 1; i < lineArray.Length; i++)
     {
         lineArray[i] = lineArray[i].Replace("\r", "");
         string[]       strArray = lineArray[i].Split(","[0]);
         StaticBulletVo vo       = new StaticBulletVo(strArray);
         _datapool.Add(vo);
     }
 }