Ejemplo n.º 1
0
    //FileTiles are client side effects only, no need for network sync (triggered by same event on all clients/server)
    public void SpawnFileTile(float fuelAmt, Vector3 position)
    {
        //ClientSide pool spawn
        GameObject fireObj = PoolManager.Instance.PoolClientInstantiate(fireTile, position, Quaternion.identity);
        FireTile   fT      = fireObj.GetComponent <FireTile>();

        fT.StartFire(fuelAmt);
    }
Ejemplo n.º 2
0
    //FileTiles are client side effects only, no need for network sync (triggered by same event on all clients/server)
    public void SpawnFileTileLocal(float fuelAmt, Vector3 localPosition, Transform parent)
    {
        //ClientSide pool spawn
        GameObject fireObj = PoolManager.Instance.PoolClientInstantiate(fireTile, Vector3.zero, Quaternion.identity);

        //Spawn tiles need to be placed in a local matrix:
        fireObj.transform.parent        = parent;
        fireObj.transform.localPosition = localPosition;
        FireTile fT = fireObj.GetComponent <FireTile>();

        fT.StartFire(fuelAmt);
    }
Ejemplo n.º 3
0
    //FileTiles are client side effects only, no need for network sync (triggered by same event on all clients/server)
    public static void SpawnFireTileClient(float fuelAmt, Vector3 localPosition, Transform parent)
    {
        EnsureInit();
        //ClientSide pool spawn
        GameObject fireObj = Spawn.ClientPrefab(fireTile, Vector3.zero).GameObject;

        //Spawn tiles need to be placed in a local matrix:
        fireObj.transform.parent        = parent;
        fireObj.transform.localPosition = localPosition;
        FireTile fT = fireObj.GetComponent <FireTile>();

        fT.StartFire(fuelAmt);
    }