예제 #1
0
    void SpawnBomb(string _prefabsPath, Vector3 _pos, Quaternion _rot)
    {
        PlayerMoveController moveController = MyNetwork.instance.localPlayer.GetComponent <PlayerMoveController>();

        GameObject spawn = null;

        if (moveController.isServer)
        {
            moveController.RpcSpawn(_prefabsPath, _pos, _rot, 10, true, 250, true);
        }
        else
        {
            moveController.CmdSpawn(_prefabsPath, _pos, _rot, 10, true, 250, true);
        }

        if (spawn)
        {
            spawn.GetComponent <Bomb>().effectRange = 10;
            spawn.GetComponent <Bomb>().unstoppable = true;
        }
    }
예제 #2
0
    void SpawnBomb(string _prefabsPath, Vector3 _pos, Quaternion _rot)
    {
        PlayerMoveController moveController = MyNetwork.instance.localPlayer.GetComponent <PlayerMoveController>();

        GameObject spawn = null;

        int bombRange = moveController.GetInventory.OnHandRange;

        if (moveController.isServer)
        {
            moveController.RpcSpawn(_prefabsPath, _pos, _rot, bombRange, false, 100, true);
        }
        else
        {
            moveController.CmdSpawn(_prefabsPath, _pos, _rot, bombRange, false, 100, true);
        }

        if (spawn)
        {
            spawn.GetComponent <Bomb>().effectRange = moveController.GetInventory.OnHandRange;
        }
    }