示例#1
0
    public override void Skill_3(params object[] param)      //远程箭
    {
        int      inputAngleX = Convert.ToInt32(param[0]);
        int      inputAngleY = Convert.ToInt32(param[1]);
        TSVector mTSVector;

        if (inputAngleX == 0 && inputAngleY == 0)
        {
            mTSVector = new TSVector(Angle.x, FP.Zero, Angle.z);
        }
        else
        {
            mTSVector = new TSVector((FP)inputAngleX / 1000, FP.Zero, (FP)inputAngleY / 1000);
        }
        //houyiBullet houyibullethouyiBullet = WillUsedPrefabs[1].GetComponent<houyiBullet>();
        //houyibullethouyiBullet.ownerIndex = (int)Id;
        //houyibullethouyiBullet.AllTSTransform.position = new TSVector(AllTSTransform.position.x, 1, AllTSTransform.position.z);
        //houyibullethouyiBullet.RotateTSTransform.rotation = TSQuaternion.LookRotation(mTSVector);
        //houyibullethouyiBullet.Angle = mTSVector;
        Debug.LogErrorFormat("Skill_3远程箭==========>{0},{1},{2},OwnerID={3}", inputAngleX, inputAngleY, mTSVector, OwnerID);
        GameObject realObj = TrueSyncManager.SyncedInstantiate(WillUsedPrefabs[1], new TSVector(AllTSTransform.position.x, 1, AllTSTransform.position.z), TSQuaternion.identity);

        realObj.SetActive(true);
        houyiBullet houyibullethouyiBullet2 = realObj.GetComponent <houyiBullet>();

        houyibullethouyiBullet2.RotateTSTransform.rotation = TSQuaternion.LookRotation(mTSVector);
        houyibullethouyiBullet2.Angle = mTSVector;
    }
示例#2
0
    protected override void InitWillUsedPrefabs()
    {
        WillUsedPrefabs    = new GameObject[4];
        WillUsedPrefabs[0] = _AssetManager.GetGameObject("prefab/effect/bullet/houyi_pengzhuang_prefab");

        WillUsedPrefabs[1] = _AssetManager.GetGameObject("prefab/effect/bullet/houyibullet_prefab");
        houyiBullet mHouYiBullet = WillUsedPrefabs[1].GetComponent <houyiBullet>();

        mHouYiBullet.OwnerCamp = OwnerCamp;
        mHouYiBullet.OwnerID   = OwnerID;
        WillUsedPrefabs[1].SetActive(false);

        WillUsedPrefabs[2] = _AssetManager.GetGameObject("prefab/effect/magical/fx/dark_area_prefab");
        houyiDarkArea mHouYiDarkArea = WillUsedPrefabs[2].GetComponent <houyiDarkArea>();

        mHouYiDarkArea.OwnerCamp = OwnerCamp;
        mHouYiDarkArea.OwnerID   = OwnerID;
        WillUsedPrefabs[2].SetActive(false);

        WillUsedPrefabs[3] = _AssetManager.GetGameObject("prefab/effect/bullet/houyibasebullet_prefab");
        houyiBaseBullet mHouYiBaseBullet = WillUsedPrefabs[3].GetComponent <houyiBaseBullet>();

        mHouYiBaseBullet.OwnerCamp = OwnerCamp;
        mHouYiBaseBullet.OwnerID   = OwnerID;
        WillUsedPrefabs[3].SetActive(false);
    }