Exemplo n.º 1
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);
    }
Exemplo n.º 2
0
    public override void Skill_4(params object[] param)      //普攻箭
    {
        Actor      mTargetActor           = param[0] as Actor;
        GameObject houyibasebullet_prefab = TrueSyncManager.SyncedInstantiate(WillUsedPrefabs[3], new TSVector(AllTSTransform.position.x, 0, AllTSTransform.position.z), TSQuaternion.identity);

        houyibasebullet_prefab.SetActive(true);
        houyiBaseBullet mYeGuaiBaseBullet = houyibasebullet_prefab.GetComponent <houyiBaseBullet>();

        mYeGuaiBaseBullet.mTargetEnemyActor = mTargetActor;
        Debug.LogErrorFormat("Skill_4普攻箭==========>OwnerID={0},TargetOwnerID={1}", OwnerID, mTargetActor.OwnerID);
    }